小编Gin*_*ger的帖子

处理node.js私有模块依赖项的推荐方法是什么?

我目前正在开发一个部署在Elastic Beanstalk上的node.js应用程序.它已经开始引用作为私有存储库托管在github上的私有模块.本地如果我在我的package.json的依赖部分中添加对它的引用,如下所示它可以正常工作.我可以运行nom安装,它下载模块和应用程序工作没有问题.

"ModuleName": "git+https://TOKEN:x-oauth-basic@github.com/OWNER/REPO_NAME.git"
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试部署到Beanstalk时,它失败并出现以下错误:

2014-04-04 00:14:09,188 [DEBUG] (1630 MainThread) [commandWrapper.py-60] [root commandWrapper main] Command result: {'status': 'FAILURE', 'results': [{'status': 'FAILURE', 'config_sets': ['Infra-EmbeddedPreBuild', 'Hook-PreAppDeploy', 'Infra-EmbeddedPostBuild'], 'returncode': 1, 'events': [{'msg': 'Failed to run npm install. Snapshot logs for more details.', 'timestamp': 1396570449, 'severity': 'ERROR'}, {'msg': 'Failed to run npm install. npm http GET https://registry.npmjs.org/express\nnpm ERR! not found: git\nnpm ERR! \nnpm ERR! Failed using git.\nnpm ERR! This is most likely not a problem with npm itself.\nnpm ERR! Please check if you have …
Run Code Online (Sandbox Code Playgroud)

deployment amazon-web-services node.js amazon-elastic-beanstalk

5
推荐指数
1
解决办法
764
查看次数