指定正确的节点版本..
This is paragraph 1<br />
This is paragraph 2<br />
This is paragraph 3<br />
This is paragraph 4<br />
This is paragraph 5<br/>This is paragraph 5<br />
This is paragraph 6<br />
This is paragraph 7
部署时,会显示以下日志..
"engines": {
"node": "6.5.0",
"npm": "3.10.3"
},
"scripts": {
"postinstall": "node_modules/gulp/bin/gulp.js buildProd",
"start": "node server.js -p $PORT"
}
所以Heroku似乎正在-----> Installing binaries
remote: engines.node (package.json): 6.5.0
remote: engines.npm (package.json): 3.10.3
engine
字段上
并安装正确的版本。
但是在Heroku上检查Node版本时......
package.json
heroku run bash
node -v
我的版本错误
答案 0 :(得分:0)
您是否正在使用Ruby Buildpack和Node.js? Ruby需要构建管道的某些部分的节点,如果节点不存在,它默认安装0.10.30。要解决这个问题,只需将Node.js Buildpack放在Ruby buildpack之前,因此当Ruby Buildpack运行时,该节点就存在。