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

2019-09-03 05:13发布

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

2条回答
等我变得足够好
2楼-- · 2019-09-03 06:05

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.

查看更多
The star\"
3楼-- · 2019-09-03 06:14

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.

查看更多
登录 后发表回答