尝试将我的应用部署到heroku并且构建成功。不幸的是,Web应用程序不起作用。我得到的错误是关于npm start。
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1,",
"start": "./index.js"
},
我假设这可能与我的package.js文件夹有关。我在脚本中添加了以下内容。
> rock-paper-scissors@1.0.0 start /Users/briankaty1/Dropbox/rock-paper- scissors
> ./index.js
sh: ./index.js: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! rock-paper-scissors@1.0.0 start: `./index.js`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the rock-paper-scissors@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/briankaty1/.npm/_logs/2018-04-10T17_33_14_741Z-debug.log
当我检查是否可以在本地运行脚本时,我收到以下错误。
version: '3'
services:
myserver:
image: myserver
build:
context: .\myserver
dockerfile: Dockerfile
volumes:
- folder:c:\folder
volumes:
folder:
我很确定我有index.js文件的路径是正确的。最终,我想在heroku上运行这个应用程序。