我正在尝试在heroku上部署本地RESTful Node.js应用程序。我按照Heroku网站(在应用程序的“部署”部分下)以及运行命令时给出的说明
git push heroku master
我得到一个非常奇怪的构建错误,指出:
remote: -----> Build
remote: Detected both "build" and "heroku-postbuild" scripts
remote: Running heroku-postbuild
remote:
remote: > resthub@1.0.0 heroku-postbuild /tmp/build_9839e223
remote: > npm run build
remote:
remote:
remote: > resthub@1.0.0 build /tmp/build_9839e223
remote: > nuxt build
remote:
remote: sh: 1: nuxt: not found
我用谷歌搜索,发现有一个框架nuxt.js?但是我根本没有在此应用程序中使用Nuxt.js。我不确定为什么要尝试运行nuxt build?因此,我真的不知道出了什么问题。
这是我的package.json文件
{
"name": "resthub",
"version": "1.0.0",
"engines": {
"node": "12.x",
"npm": "6.x"
},
"description": "An app demonstrating RESTful API implementation",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"api",
"restful",
"json"
],
"author": "Chen Kaibin",
"license": "ISC",
"dependencies": {
"body-parser": "^1.19.0",
"express": "^4.17.1",
"mongoose": "^5.10.7"
},
}