Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator module version is set to its latest in dependencies #107

Open
imesh opened this issue Dec 21, 2018 · 0 comments
Open

Validator module version is set to its latest in dependencies #107

imesh opened this issue Dec 21, 2018 · 0 comments

Comments

@imesh
Copy link

imesh commented Dec 21, 2018

As it seems like 'validator' module version has been set to its latest in dependencies and as a result validation logic written in login.js and registration.js` files are not functioning now:

api-proxy: login-app
package.json

  "name": "oauth-login-consent",
  "version": "1.0.1",
  "description": "Lightweight web app to support OAuth2 authorization_code grant login/consent flow.",
  "main": "app.js",
  "repository": "https://github.com/apigee/api-platform-samples.git",
  "dependencies": {
    "apigee-access": "^1.3.0",
    "body-parser": "^1.9.2",
    "cookie-parser": "^1.3.3",
    "ejs-locals": "^1.0.2",
    "express": "^4.10.2",
    "express-session": "^1.9.1",
    "less-middleware": "^0.1.12",
    "serve-favicon": "^2.1.6",
    "validator": ">2.0.0"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Apigee Corporation",
  "license": "MIT"
}

Error:

TypeError: org.mozilla.javascript.Undefined@0 is not a function, it is undefined.
    at /organization/environment/api/routes/registration.js:117:0
    at /organization/environment/api/routes/registration.js:24:0
    at handle (/organization/environment/api/node_modules/express/lib/router/layer.js:95:0)
    at next (/organization/environment/api/node_modules/express/lib/router/route.js:137:0)
    at dispatch (/organization/environment/api/node_modules/express/lib/router/route.js:112:0)
    at handle (/organization/environment/api/node_modules/express/lib/router/layer.js:95:0)
    at /organization/environment/api/node_modules/express/lib/router/index.js:281:0
    at process_params (/organization/environment/api/node_modules/express/lib/router/index.js:335:0)
    at next (/organization/environment/api/node_modules/express/lib/router/index.js:275:0)
    at /organization/environment/api/node_modules/body-parser/lib/read.js:130:0
    at invokeCallback (/organization/environment/api/node_modules/raw-body/index.js:224:0)
    at done (/organization/environment/api/node_modules/raw-body/index.js:213:0)
    at onEnd (/organization/environment/api/node_modules/raw-body/index.js:273:0)
    at emit (events.js:92:0)
    at _stream_readable.js:943:0
    at _tickDomainCallback (trireme.js:491:0)
    at _tickFromSpinner (trireme.js:422:0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant