首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到模块'jws‘

找不到模块'jws‘
EN

Stack Overflow用户
提问于 2016-02-21 21:05:29
回答 1查看 869关注 0票数 1

当将我的应用程序推到没有本地node_modules的Bluemix和添加passport-idaas-openidconnect依赖项时,我得到以下错误:问题在于我的应用程序,而不是npm,但错误来自/home/vcap/app/node_modules/passport-idaas-openidconnect/lib/strategy.js:8:11

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-22 06:46:03

为了使用Bluemix服务推送具有SSO功能的Node.js应用程序,您至少需要package.json文件中的下列依赖项:

代码语言:javascript
复制
"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单点登录文档-配置应用程序中所报告的那样。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35542023

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档