当将我的应用程序推到没有本地node_modules的Bluemix和添加passport-idaas-openidconnect依赖项时,我得到以下错误:问题在于我的应用程序,而不是npm,但错误来自/home/vcap/app/node_modules/passport-idaas-openidconnect/lib/strategy.js:8:11
ERR module.js:338
ERR;
ERR ^
ERRor: Cannot find module 'jws'
ERR at Function.Module._resolveFilename (module.js:336:15)
ERR at Function.Module._load (module.js:278:25)
ERR at Module.require (module.js:365:17)
ERR at require (module.js:384:17)
ERR at Object.<anonymous> (/home/vcap/app/node_modules/passport-idaas-openidconnect/lib/strategy.js:8:11)
ERR at Module._compile (module.js:460:26)
ERR at Object.Module._extensions..js (module.js:478:10)
ERR at Module.load (module.js:355:32)
ERR at Function.Module._load (module.js:310:12)
ERR at Module.require (module.js:365:17)
ERR at require (module.js:384:17)
ERR! Linux 3.19.0-25-generic
ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"
ERR! node v0.12.10
ERR! npm v2.14.9
ERR! code ELIFECYCLE
ERR! myapp@0.4.2 start: `node app.js`
ERR! Exit status 1
ERR!
ERR! Failed at the myapp@0.4.2 start script 'node app.js'.
ERR! This is most likely a problem with the myapp package,
ERR! not with npm itself.
ERR! Tell the author that this fails on your system:
ERR! node app.js
ERR! You can get their info via:
ERR! npm owner ls myappe
ERR! There is likely additional logging output above.
ERR! Please include the following file with any support request:
ERR! /home/vcap/app/npm-debug.log
ERR Instance (index 0) failed to start accepting connections发布于 2016-02-22 06:46:03
为了使用Bluemix服务推送具有SSO功能的Node.js应用程序,您至少需要package.json文件中的下列依赖项:
"dependencies": {
[...]
"cookie-parser": "^1.4.1",
"express": "^4.12.4",
"express-session": "^1.13.0",
"passport": "^0.2.2",
"passport-idaas-openidconnect": "^1.0.0"
[...]
}请注意,护照-idaas-openidconnect模块的工作护照版本0.1.1至0.3.2。超过0.3.2的版本可能无法正常工作,正如Bluemix单点登录文档-配置应用程序中所报告的那样。
https://stackoverflow.com/questions/35542023
复制相似问题