Error setting up node v0.11.x on Azure WebSite

[亡魂溺海] 提交于 2019-12-11 20:00:28

问题


We are trying to move a node.js app that requires node v0.11.x to Azure WebSites.

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.

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...

Any ideas on how to either solve this or, alternatively, how to force nodist to keep using npm v1.4.*?


回答1:


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.

Edit: See github.com/mtian/custom-version for an example.




回答2:


Looks like there's a typo somewhere (it's failing on 'ode' which should probably be 'node'). You could try finding where that typo is coming from and fix it.



来源:https://stackoverflow.com/questions/25194947/error-setting-up-node-v0-11-x-on-azure-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!