问题描述
我们正在尝试将需要节点v0.11.x的node.js应用程序移动到Azure网站.
We are trying to move a node.js app that requires node v0.11.x to Azure WebSites.
当尝试使用 azure-node-runtime-selector 安装节点时v0.11.x,我们遇到了由nodist安装npm 2.0.0-alpha引起的错误.
When trying to use azure-node-runtime-selector to install node v0.11.x, we encounted what seems a bug caused by nodist installing npm 2.0.0-alpha.
在对nodist update的调用输出下面:
Below the output of call to nodist update:
1 file(s) copied.
npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/2.0.0-alpha-5
npm http 304 https://registry.npmjs.org/npm/2.0.0-alpha-5
D:\home\node\nodist\bin\npm -> D:\home\node\nodist\bin\node_modules\npm\bin\npm-cli.js
npm@2.0.0-alpha-5 D:\home\node\nodist\bin\node_modules\npm
'ode' is not recognized as an internal or external command,
1 file(s) moved.
operable program or batch file.
Install dependencies...
关于如何解决此问题或如何强制nodist继续使用npm v1.4.*的任何想法?
Any ideas on how to either solve this or, alternatively, how to force nodist to keep using npm v1.4.*?
推荐答案
如果您不介意其他解决方案,则可以使用本指南在与Azure网站一起使用自定义版本"部分下.唯一重要的步骤是将您自己的node.exe与应用程序一起使用,并在 iisnode.yml 中将" nodeProcessCommandLine:"设置为node.exe的路径.
If you don't mind an alternative solution, you can use this guide under the section "Using a custom version with Azure Web Sites". The only important step is to bring your own node.exe with your app, and set "nodeProcessCommandLine: " in iisnode.yml to your node.exe's path.
有关示例,请参见github.com/mtian/custom-version.
See github.com/mtian/custom-version for an example.
这篇关于在Azure WebSite上设置节点v0.11.x时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!