microsoft / botbuilder-tools

Welcome to the Bot Framework Tools repository, which is the home for a set of tools for developers building bots with the Microsoft Bot Framework
https://github.com/Microsoft/botframework
MIT License
444 stars 262 forks source link

Install fails for botdispatch and botskills #1438

Closed srajanpm closed 4 years ago

srajanpm commented 4 years ago

What project is affected?

microsoft/botframework-solutions

What language is this in?

npm

What happens?

Install fails for botdispatch while executing these commands:

npm install -g botdispatch @microsoft/botframework-cli

npm install -g botskills@latest

What are the steps to reproduce this issue?

Environment: macOS Darwin 10.13 , npm: 6.14.4 and dotnet SDK 3.1.300

  1. install VStudio for mac
  2. clone https://github.com/microsoft/botframework-solutions as VStudio for mac doesn't support VSIX packages
  3. install .net core sdk - installs the latest version 3.1.300
  4. install npm
  5. install powershellcore
  6. npm install -g botdispatch @microsoft/botframework-cli

What were you expecting to happen?

successful installation of botdispatch followed by botskills

Can you share any logs, error output, etc.?

npm install -g botdispatch @microsoft/botframework-cli

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 /usr/local/bin/bf -> /usr/local/lib/node_modules/@microsoft/botframework-cli/bin/run /usr/local/bin/dispatch -> /usr/local/lib/node_modules/botdispatch/bin/dispatch.js

@microsoft/botframework-cli@4.9.0 postinstall /usr/local/lib/node_modules/@microsoft/botframework-cli node scripts/postinstall.js

Help us improve products by allowing Microsoft to collect anonymous command and flags usage: (Y/N): n Telemetry will remain disabled At any time you may enable collect anonymous command and flags usage by changing the configuration using command: bf config:set:telemetry --enable

dotnet-2.1@2.1.1005 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:287 throw er; // Unhandled 'error' event ^

Error: spawn /usr/local/bin/node ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn /usr/local/bin/node', path: '/usr/local/bin/node', spawnargs: [ '/usr/local/lib/node_modules/botdispatch/node_modules/dotnet-2.1/dist/static-loader.js', '--load-module=/usr/local/lib/node_modules/botdispatch/node_modules/dotnet-2.1/dist/static_modules.fs', '/node_modules/yarn/bin/yarn.js', 'add', 'dotnet-2.1-osx-x64', '--force', '--silent', '--no-lockfile', '--json' ] } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! dotnet-2.1@2.1.1005 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.1005 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Any screenshots or additional context?

Batta32 commented 4 years ago

Hi @srajanpm, thanks for reporting this issue! We couldn't reproduce your issue, so we came up with some validations for you:

  1. Have you tried to install each dependencies separated? The reason is to narrow the problem to only one dependency
  2. Did you have installed dotnet-2.1 as prereq?

    npm install -g dotnet-2.1

If the problem is related to botdispatch, we think that this issue should be transferred to botbuilder-tools repository, is that okay with you?

This is our environment:

We found some related issues for botdispatch in macOS , please follow these issues:

Hope this helps to you šŸ˜Š!

srajanpm commented 4 years ago

Thanks @Batta32

I tried installing dotnet-2.1 and I am getting the same error.

/usr/local/bin/dotnet -> /usr/local/lib/node_modules/dotnet-2.1/dist/call.js /usr/local/bin/dotnet-run -> /usr/local/lib/node_modules/dotnet-2.1/dist/call.js /usr/local/bin/install-dotnet-runtime -> /usr/local/lib/node_modules/dotnet-2.1/dist/app.js /usr/local/bin/dotnet-run-2.1 -> /usr/local/lib/node_modules/dotnet-2.1/dist/call.js /usr/local/bin/which-dotnet -> /usr/local/lib/node_modules/dotnet-2.1/dist/find.js /usr/local/bin/which-dotnet-runtime -> /usr/local/lib/node_modules/dotnet-2.1/dist/find.js

dotnet-2.1@2.1.1005 postinstall /usr/local/lib/node_modules/dotnet-2.1 node -e "/PostInstall: Installs platform-specific .NET framework /try{require('./dist/app.js')}catch(e){}"

events.js:287 throw er; // Unhandled 'error' event ^

Error: spawn /usr/local/bin/node ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn /usr/local/bin/node', path: '/usr/local/bin/node', spawnargs: [ '/usr/local/lib/node_modules/dotnet-2.1/dist/static-loader.js', '--load-module=/usr/local/lib/node_modules/dotnet-2.1/dist/static_modules.fs', '/node_modules/yarn/bin/yarn.js', 'add', 'dotnet-2.1-osx-x64', '--force', '--silent', '--no-lockfile', '--json' ] } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! dotnet-2.1@2.1.1005 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.1005 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I agree to move to the issue to bot-buildertools repo.

Batta32 commented 4 years ago

Thanks @srajanpm šŸ˜Š! @stevengum could you possibly transfer this issue to botbuilder-tools?

munozemilio commented 4 years ago

@tsuwandy could you please take a look at this one?

tsuwandy commented 4 years ago

@srajanpm, have you tried uninstalling dotnet 3.1 and retry the install?

srajanpm commented 4 years ago

@tsuwandy yes I uninstalled dotnet 3.1 and retried the dotnet-2.1 install and it fails with the same error.

tsuwandy commented 4 years ago

@srajanpm, did you check out these related issues (installing on MacOS) added by @Batta32 in earlier thread:

https://github.com/microsoft/botbuilder-tools/issues/862 https://github.com/microsoft/botbuilder-tools/issues/176

.NET Core install instructionfor MacOS: https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31

srajanpm commented 4 years ago

@tsuwandy

I followed #862 and it looks like it helped but not sure.

I tried installing dotnet 2.1 locally instead of globally, seems like dotnet2.1 is installed - i see the following message:

+ dotnet-2.1@2.1.1005 added 1 package and audited 1 package in 1.098s

and an error:

_> node -e "/PostInstall: Installs platform-specific .NET framework /try{require('./dist/app.js')}catch(e){}"

npm WARN saveError ENOENT: no such file or directory, open '/Users/srajan/package.json'_

And checking with "dotnet --list-sdks" returns nothing.

tsuwandy commented 4 years ago

862 actually has quite different instructions. Did you pre-install dotnet first (per the prerequisite instructions https://github.com/microsoft/botbuilder-tools/tree/master/packages/Dispatch#prerequisite):

https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31

a-b-r-o-w-n commented 4 years ago

Closing due to inactivity. Feel free to re-open this.