我试图在 Linux 上的 Azure 应用服务上安装 botdispatch npm 模块作为 bot 框架 4 的一部分,但我遇到了这个错误。
这是我得到的错误:
root@1c46f16cd26b:/home/site/wwwroot# **npm install -g botdispatch**
/usr/local/bin/dispatch -> /usr/local/lib/node_modules/botdispatch/bin/dispatch.js
> dotnet-2.1@2.1.1003 postinstall /usr/local/lib/node_modules/botdispatch/node_modules/dotnet-2.1
> node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"
events.js:167
throw er; // Unhandled 'error' event
^
Error: spawn /usr/local/bin/node EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dotnet-2.1@2.1.1003 postinstall: `node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dotnet-2.1@2.1.1003 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-16T18_53_05_409Z-debug.log