Geo*_*off 5 heroku node.js npm
我正在向Heroku部署Node应用程序并收到以下错误.如果npm不能与最新版本的Node一起使用,我们应该将什么用于包管理器?我真的很喜欢node_modules和package.json.这似乎很合乎逻辑.
-----> Heroku receiving push
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.8.5
Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
Error: npm doesn't work with node v0.8.5
Required: node@0.4 || 0.5 || 0.6
Run Code Online (Sandbox Code Playgroud)
Jon*_*ski 11
如果你指定的Node.js 0.8.x
通过"engines"
在你的package.json
,你可能还需要设置一个版本"npm"
:
{
...
"engines": {
"node": "0.8.x",
"npm": "1.1.x"
}
}
Run Code Online (Sandbox Code Playgroud)
来自Heroku Dev Center for Node.js:
如果未指定版本,则将获得以下默认值:
- Node.js的:
0.4.7
- 故宫:
1.0.106
该页面还包含指向两者的受支持版本清单的链接.
归档时间: |
|
查看次数: |
1422 次 |
最近记录: |