【发布时间】:2016-05-25 02:11:40
【问题描述】:
我对亚马逊网络服务非常陌生,我正在尝试在他们的弹性 beanstalk 上设置一个 node.js 应用程序。我设置了实例并上传/部署了站点,但是当运行状况“正常”时,node.js 日志显示这重复了大约 30 次:
npm ERR! enoent ENOENT: no such file or directory, open '/var/app/current/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /var/app/current/npm-debug.log
npm ERR! Linux 4.1.13-19.31.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/npm" "start"
npm ERR! node v4.2.3
npm ERR! npm v2.14.7
npm ERR! path /var/app/current/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
问题是我的 package.json 确实存在,因为我使用 npm init 生成了一个。关于为什么找不到它的任何想法?这是package.json
{
"name": "testwebsite",
"version": "0.0.1",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"body-parser": "^1.13.3",
"express": "^4.13.3",
"express-session": "~1.0.0",
"socket.io": "^1.3.7"
},
"description": "my website",
"author": "Matt",
"engines": {
"node": ">=0.10.0"
},
"main": "server.js",
"devDependencies": {},
"license": "ISC"
}
【问题讨论】:
-
你有没有想过这个问题?我遇到了同样的问题。
标签: node.js amazon-web-services amazon-ec2 amazon-elastic-beanstalk