2

我试图在 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
4

2 回答 2

1

删除模块并从全局模块文件夹中手动删除“bot dispatcher”并安装它对我有用。

于 2021-01-07T06:21:11.067 回答
0

根据文档,此模块需要 .NET Core 作为先决条件。根据您在应用服务上使用的框架版本,您可能需要对您的方法进行一些修改。 https://www.npmjs.com/package/botdispatch

于 2019-09-23T20:29:52.060 回答