我正在将Node应用程序部署到Heroku,并收到以下错误。如果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发布于 2012-08-04 15:17:12
如果在package.json中通过"engines"指定Node.js 0.8.x,则可能还需要设置"npm"的版本
{
...
"engines": {
"node": "0.8.x",
"npm": "1.1.x"
}
}从Heroku Dev Center for Node.js
如果不指定版本,则将获得以下默认值:
0.4.7
1.0.106:
该页面还包括指向两者支持的版本清单的链接。
发布于 2012-08-04 12:08:37
您得到的只是一个过时的npm版本:当前版本是1.1.45,与node的0.8.x版本配合使用很好。
https://stackoverflow.com/questions/11805770
复制相似问题