Closed EdwinOtten closed 5 years ago
This might be an issue with the dotnet-2.1 npm package because I ran into a related error when trying to do a fresh install of botdispatch and .NET Core.
I did the following:
Uninstalled the dispatch-cli via npm uninstall -g botdispatch
Uninstalled all versions of .NET Core SDK via Programs and Features
Rebooted my PC
Installed the .NET Core Runtime via the Visual Studio Installer
When running npm install -g botdispatch
, it throws an error on the postinstall script of dotnet-2.1@2.1.1005:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Eotten\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'botdispatch'
1 verbose cli ]
2 info using npm@6.12.1
3 info using node@v12.13.0
4 verbose npm-session 1b52d9fe22d8a3f0
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/botdispatch 204ms (from cache)
8 silly pacote tag manifest for botdispatch@latest fetched in 227ms
9 timing stage:loadCurrentTree Completed in 251ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 3ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule botdispatch@1.5.8 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/dotnet-2.1 83ms (from cache)
18 silly pacote range manifest for dotnet-2.1@^2.1.0 fetched in 88ms
19 silly resolveWithNewModule dotnet-2.1@2.1.1005 checking installable status
20 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 92ms
21 timing stage:loadIdealTree Completed in 96ms
22 silly currentTree npm
23 silly idealTree npm
23 silly idealTree `-- botdispatch@1.5.8
23 silly idealTree `-- dotnet-2.1@2.1.1005
24 silly install generateActionsToTake
25 timing stage:generateActionsToTake Completed in 3ms
26 silly diffTrees action count 2
27 silly diffTrees add dotnet-2.1@2.1.1005
28 silly diffTrees add botdispatch@1.5.8
29 silly decomposeActions action count 16
30 silly decomposeActions fetch dotnet-2.1@2.1.1005
31 silly decomposeActions extract dotnet-2.1@2.1.1005
32 silly decomposeActions preinstall dotnet-2.1@2.1.1005
33 silly decomposeActions build dotnet-2.1@2.1.1005
34 silly decomposeActions install dotnet-2.1@2.1.1005
35 silly decomposeActions postinstall dotnet-2.1@2.1.1005
36 silly decomposeActions finalize dotnet-2.1@2.1.1005
37 silly decomposeActions refresh-package-json dotnet-2.1@2.1.1005
38 silly decomposeActions fetch botdispatch@1.5.8
39 silly decomposeActions extract botdispatch@1.5.8
40 silly decomposeActions preinstall botdispatch@1.5.8
41 silly decomposeActions build botdispatch@1.5.8
42 silly decomposeActions install botdispatch@1.5.8
43 silly decomposeActions postinstall botdispatch@1.5.8
44 silly decomposeActions finalize botdispatch@1.5.8
45 silly decomposeActions refresh-package-json botdispatch@1.5.8
46 silly install executeActions
47 silly doSerial global-install 16
48 verbose correctMkdir C:\Users\Eotten\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
49 verbose makeCacheDir UID & GID are irrelevant on win32
50 verbose lock using C:\Users\Eotten\AppData\Roaming\npm-cache\_locks\staging-83d89485cd196565.lock for C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging
51 silly doParallel extract 2
52 silly extract dotnet-2.1@2.1.1005
53 silly extract botdispatch@1.5.8
54 silly tarball trying dotnet-2.1@^2.1.0 by hash: sha512-dwS5/msZNOBSfoIEmgvt3uxlx1MMiwMUxkiuyiuaMulM6gWmPlea5FyfWt4gdYjl1a5twKmeo748n8s9l13qtQ==
55 silly tarball trying botdispatch@latest by hash: sha512-YWUK2EVr4QwhrBwNlCB4cA+IZOl4A9w7VeyfUF/+RMe6tTXPwuOz3Y5kOahgIh/lMk2j9RTFcBk/eKH0NB0wsA==
56 silly extract dotnet-2.1@^2.1.0 extracted to C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging\dotnet-2.1-90d92df0 (85ms)
57 silly extract botdispatch@latest extracted to C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging\botdispatch-d220f1a1 (203ms)
58 timing action:extract Completed in 205ms
59 silly doReverseSerial unbuild 16
60 silly doSerial remove 16
61 silly doSerial move 16
62 silly doSerial finalize 16
63 silly finalize C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1
64 silly finalize C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch
65 timing action:finalize Completed in 9ms
66 silly doParallel refresh-package-json 2
67 silly refresh-package-json C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1
68 silly refresh-package-json C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch
69 timing action:refresh-package-json Completed in 21ms
70 silly doParallel preinstall 2
71 silly preinstall dotnet-2.1@2.1.1005
72 info lifecycle dotnet-2.1@2.1.1005~preinstall: dotnet-2.1@2.1.1005
73 silly preinstall botdispatch@1.5.8
74 info lifecycle botdispatch@1.5.8~preinstall: botdispatch@1.5.8
75 timing action:preinstall Completed in 1ms
76 silly doSerial build 16
77 silly build dotnet-2.1@2.1.1005
78 info linkStuff dotnet-2.1@2.1.1005
79 silly linkStuff dotnet-2.1@2.1.1005 has C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules as its parent node_modules
80 silly linkStuff dotnet-2.1@2.1.1005 is part of a global install
81 silly linkStuff dotnet-2.1@2.1.1005 is installed into a global node_modules
82 verbose linkBins [
82 verbose linkBins {
82 verbose linkBins dotnet: './dist/call.js',
82 verbose linkBins 'dotnet-run': './dist/call.js',
82 verbose linkBins 'dotnet-run-2.1': './dist/call.js',
82 verbose linkBins 'install-dotnet-runtime': './dist/app.js',
82 verbose linkBins 'which-dotnet-runtime': './dist/find.js',
82 verbose linkBins 'which-dotnet': './dist/find.js'
82 verbose linkBins },
82 verbose linkBins 'C:\\Users\\Eotten\\AppData\\Roaming\\npm\\node_modules\\botdispatch\\node_modules\\.bin',
82 verbose linkBins false
82 verbose linkBins ]
83 silly build botdispatch@1.5.8
84 info linkStuff botdispatch@1.5.8
85 silly linkStuff botdispatch@1.5.8 has C:\Users\Eotten\AppData\Roaming\npm\node_modules as its parent node_modules
86 silly linkStuff botdispatch@1.5.8 is part of a global install
87 silly linkStuff botdispatch@1.5.8 is installed into a global node_modules
88 silly linkStuff botdispatch@1.5.8 is installed into the top-level global node_modules
89 verbose linkBins [
89 verbose linkBins { dispatch: 'bin/dispatch.js' },
89 verbose linkBins 'C:\\Users\\Eotten\\AppData\\Roaming\\npm',
89 verbose linkBins true
89 verbose linkBins ]
90 timing action:build Completed in 12ms
91 silly doSerial global-link 16
92 silly doParallel update-linked 0
93 silly doSerial install 16
94 silly install dotnet-2.1@2.1.1005
95 info lifecycle dotnet-2.1@2.1.1005~install: dotnet-2.1@2.1.1005
96 silly install botdispatch@1.5.8
97 info lifecycle botdispatch@1.5.8~install: botdispatch@1.5.8
98 timing action:install Completed in 0ms
99 silly doSerial postinstall 16
100 silly postinstall dotnet-2.1@2.1.1005
101 info lifecycle dotnet-2.1@2.1.1005~postinstall: dotnet-2.1@2.1.1005
102 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: unsafe-perm in lifecycle true
103 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: PATH: C:\Users\Eotten\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1\node_modules\.bin;C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\.bin;C:\Users\Eotten\AppData\Roaming\npm\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\CCM;C:\Program Files\Git\cmd;C:\Users\Eotten\AppData\Roaming\npm;C:\Program Files\PowerShell\6\;C:\Program Files\nodejs\;C:\Program Files\dotnet\;C:\Users\Eotten\AppData\Local\Microsoft\WindowsApps;C:\Users\Eotten\.dotnet\tools;C:\Users\Eotten\AppData\Roaming\npm;C:\Users\Eotten\AppData\Roaming\npm
104 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: CWD: C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1
105 silly lifecycle dotnet-2.1@2.1.1005~postinstall: Args: [
105 silly lifecycle '/d /s /c',
105 silly lifecycle `node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"`
105 silly lifecycle ]
106 silly lifecycle dotnet-2.1@2.1.1005~postinstall: Returned: code: 1 signal: null
107 info lifecycle dotnet-2.1@2.1.1005~postinstall: Failed to exec postinstall script
108 timing action:postinstall Completed in 358ms
109 verbose unlock done using C:\Users\Eotten\AppData\Roaming\npm-cache\_locks\staging-83d89485cd196565.lock for C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging
110 timing stage:rollbackFailedOptional Completed in 20ms
111 timing stage:runTopLevelLifecycles Completed in 983ms
112 verbose stack Error: dotnet-2.1@2.1.1005 postinstall: `node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"`
112 verbose stack Exit status 1
112 verbose stack at EventEmitter.<anonymous> (C:\Users\Eotten\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
112 verbose stack at EventEmitter.emit (events.js:210:5)
112 verbose stack at ChildProcess.<anonymous> (C:\Users\Eotten\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
112 verbose stack at ChildProcess.emit (events.js:210:5)
112 verbose stack at maybeClose (internal/child_process.js:1021:16)
112 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
113 verbose pkgid dotnet-2.1@2.1.1005
114 verbose cwd C:\WINDOWS\system32
115 verbose Windows_NT 10.0.18362
116 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Eotten\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "botdispatch"
117 verbose node v12.13.0
118 verbose npm v6.12.1
119 error code ELIFECYCLE
120 error errno 1
121 error dotnet-2.1@2.1.1005 postinstall: `node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"`
121 error Exit status 1
122 error Failed at the dotnet-2.1@2.1.1005 postinstall script.
122 error This is probably not a problem with npm. There is likely additional logging output above.
123 verbose exit [ 1, true ]
Unfortuntely, I am not able to reproduce.
@tsuwandy Any thoughts?
@EdwinOtten, there was an issue with the install script for dotnet-2.1 package with node version 12 and latest package has been republished to npm. Which version of nodejs do you have?
In any case, try the following after unintalling botdispatch: If you are using a machine you have already installed .net npm packages previously, from powershell run :
npm cache clean --force
erase -recurse "$home/.net"
Then try the install again. Let me know if you are still having install issues. Thanks!
@tsuwandy I'm running node 12.13.0 (latest LTS version). I tried uninstalling and running the commands you mentioned in powershell (version 6, in admin mode)
npm uninstall -g botdispatch
npm cache clean --force
erase -recurse "$home/.net"
npm i -g botdispatch
It still throws the ELIFECYCLE error: Failed at the dotnet-2.1@2.1.1005 postinstall script
I could try downgrading to a LTS version of node 10, would that make a difference?
@EdwinOtten, please try node 10. I’ll try to get a repro with node 12 and will inform dotnet team of the errors again. Thanks!
@tsuwandy I uninstalled node, rebooted my pc. Then I installed node 10 and downgraded npm to the corresponding version. After this I tried to install botdispatch, but still the same error 😞
PS C:\Users\Eotten> node -v
v10.17.0
PS C:\Users\Eotten> npm -v
6.11.3
PS C:\Users\Eotten> npm uninstall -g botdispatch
up to date in 0.026s
PS C:\Users\Eotten> npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
PS C:\Users\Eotten> erase -recurse "$home/.net"
PS C:\Users\Eotten> npm i -g botdispatch
C:\Users\Eotten\AppData\Roaming\npm\dispatch -> C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\bin\dispatch.js
> dotnet-2.1@2.1.1005 postinstall C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1
> node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"
Unable to install/use dotnet framework.
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Eotten\AppData\Roaming\npm-cache\_logs\2019-11-05T08_24_52_011Z-debug.log
```
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Eotten\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'i',
1 verbose cli '-g',
1 verbose cli 'botdispatch' ]
2 info using npm@6.11.3
3 info using node@v10.17.0
4 verbose npm-session fecc55127e650e6b
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/botdispatch 943ms
8 silly pacote tag manifest for botdispatch@latest fetched in 963ms
9 timing stage:loadCurrentTree Completed in 977ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule botdispatch@1.5.8 checking installable status
17 http fetch GET 200 https://registry.npmjs.org/dotnet-2.1 820ms
18 silly pacote range manifest for dotnet-2.1@^2.1.0 fetched in 825ms
19 silly resolveWithNewModule dotnet-2.1@2.1.1005 checking installable status
20 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 830ms
21 timing stage:loadIdealTree Completed in 832ms
22 silly currentTree npm
23 silly idealTree npm
23 silly idealTree `-- botdispatch@1.5.8
23 silly idealTree `-- dotnet-2.1@2.1.1005
24 silly install generateActionsToTake
25 timing stage:generateActionsToTake Completed in 3ms
26 silly diffTrees action count 2
27 silly diffTrees add dotnet-2.1@2.1.1005
28 silly diffTrees add botdispatch@1.5.8
29 silly decomposeActions action count 16
30 silly decomposeActions fetch dotnet-2.1@2.1.1005
31 silly decomposeActions extract dotnet-2.1@2.1.1005
32 silly decomposeActions preinstall dotnet-2.1@2.1.1005
33 silly decomposeActions build dotnet-2.1@2.1.1005
34 silly decomposeActions install dotnet-2.1@2.1.1005
35 silly decomposeActions postinstall dotnet-2.1@2.1.1005
36 silly decomposeActions finalize dotnet-2.1@2.1.1005
37 silly decomposeActions refresh-package-json dotnet-2.1@2.1.1005
38 silly decomposeActions fetch botdispatch@1.5.8
39 silly decomposeActions extract botdispatch@1.5.8
40 silly decomposeActions preinstall botdispatch@1.5.8
41 silly decomposeActions build botdispatch@1.5.8
42 silly decomposeActions install botdispatch@1.5.8
43 silly decomposeActions postinstall botdispatch@1.5.8
44 silly decomposeActions finalize botdispatch@1.5.8
45 silly decomposeActions refresh-package-json botdispatch@1.5.8
46 silly install executeActions
47 silly doSerial global-install 16
48 verbose correctMkdir C:\Users\Eotten\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
49 verbose makeCacheDir UID & GID are irrelevant on win32
50 verbose lock using C:\Users\Eotten\AppData\Roaming\npm-cache\_locks\staging-83d89485cd196565.lock for C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging
51 silly doParallel extract 2
52 silly extract dotnet-2.1@2.1.1005
53 silly extract botdispatch@1.5.8
54 silly tarball trying dotnet-2.1@^2.1.0 by hash: sha512-dwS5/msZNOBSfoIEmgvt3uxlx1MMiwMUxkiuyiuaMulM6gWmPlea5FyfWt4gdYjl1a5twKmeo748n8s9l13qtQ==
55 silly tarball trying botdispatch@latest by hash: sha512-YWUK2EVr4QwhrBwNlCB4cA+IZOl4A9w7VeyfUF/+RMe6tTXPwuOz3Y5kOahgIh/lMk2j9RTFcBk/eKH0NB0wsA==
56 silly tarball no local data for dotnet-2.1@^2.1.0. Extracting by manifest.
57 silly tarball no local data for botdispatch@latest. Extracting by manifest.
58 http fetch GET 200 https://registry.npmjs.org/dotnet-2.1/-/dotnet-2.1-2.1.1005.tgz 220ms
59 silly extract dotnet-2.1@^2.1.0 extracted to C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging\dotnet-2.1-90d92df0 (232ms)
60 http fetch GET 200 https://registry.npmjs.org/botdispatch/-/botdispatch-1.5.8.tgz 325ms
61 silly extract botdispatch@latest extracted to C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging\botdispatch-d220f1a1 (334ms)
62 timing action:extract Completed in 336ms
63 silly doReverseSerial unbuild 16
64 silly doSerial remove 16
65 silly doSerial move 16
66 silly doSerial finalize 16
67 silly finalize C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1
68 silly finalize C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch
69 timing action:finalize Completed in 16ms
70 silly doParallel refresh-package-json 2
71 silly refresh-package-json C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1
72 silly refresh-package-json C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch
73 timing action:refresh-package-json Completed in 13ms
74 silly doParallel preinstall 2
75 silly preinstall dotnet-2.1@2.1.1005
76 info lifecycle dotnet-2.1@2.1.1005~preinstall: dotnet-2.1@2.1.1005
77 silly preinstall botdispatch@1.5.8
78 info lifecycle botdispatch@1.5.8~preinstall: botdispatch@1.5.8
79 timing action:preinstall Completed in 1ms
80 silly doSerial build 16
81 silly build dotnet-2.1@2.1.1005
82 info linkStuff dotnet-2.1@2.1.1005
83 silly linkStuff dotnet-2.1@2.1.1005 has C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules as its parent node_modules
84 silly linkStuff dotnet-2.1@2.1.1005 is part of a global install
85 silly linkStuff dotnet-2.1@2.1.1005 is installed into a global node_modules
86 verbose linkBins [ { dotnet: './dist/call.js',
86 verbose linkBins 'dotnet-run': './dist/call.js',
86 verbose linkBins 'dotnet-run-2.1': './dist/call.js',
86 verbose linkBins 'install-dotnet-runtime': './dist/app.js',
86 verbose linkBins 'which-dotnet-runtime': './dist/find.js',
86 verbose linkBins 'which-dotnet': './dist/find.js' },
86 verbose linkBins 'C:\\Users\\Eotten\\AppData\\Roaming\\npm\\node_modules\\botdispatch\\node_modules\\.bin',
86 verbose linkBins false ]
87 silly build botdispatch@1.5.8
88 info linkStuff botdispatch@1.5.8
89 silly linkStuff botdispatch@1.5.8 has C:\Users\Eotten\AppData\Roaming\npm\node_modules as its parent node_modules
90 silly linkStuff botdispatch@1.5.8 is part of a global install
91 silly linkStuff botdispatch@1.5.8 is installed into a global node_modules
92 silly linkStuff botdispatch@1.5.8 is installed into the top-level global node_modules
93 verbose linkBins [ { dispatch: 'bin/dispatch.js' },
93 verbose linkBins 'C:\\Users\\Eotten\\AppData\\Roaming\\npm',
93 verbose linkBins true ]
94 timing action:build Completed in 13ms
95 silly doSerial global-link 16
96 silly doParallel update-linked 0
97 silly doSerial install 16
98 silly install dotnet-2.1@2.1.1005
99 info lifecycle dotnet-2.1@2.1.1005~install: dotnet-2.1@2.1.1005
100 silly install botdispatch@1.5.8
101 info lifecycle botdispatch@1.5.8~install: botdispatch@1.5.8
102 timing action:install Completed in 0ms
103 silly doSerial postinstall 16
104 silly postinstall dotnet-2.1@2.1.1005
105 info lifecycle dotnet-2.1@2.1.1005~postinstall: dotnet-2.1@2.1.1005
106 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: unsafe-perm in lifecycle true
107 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: PATH: C:\Users\Eotten\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1\node_modules\.bin;C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\.bin;C:\Users\Eotten\AppData\Roaming\npm\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\CCM;C:\Program Files\Git\cmd;C:\Users\Eotten\AppData\Roaming\npm;C:\Program Files\PowerShell\6\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\Users\Eotten\AppData\Local\Microsoft\WindowsApps;C:\Users\Eotten\.dotnet\tools;C:\Users\Eotten\AppData\Roaming\npm;C:\Users\Eotten\AppData\Roaming\npm
108 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: CWD: C:\Users\Eotten\AppData\Roaming\npm\node_modules\botdispatch\node_modules\dotnet-2.1
109 silly lifecycle dotnet-2.1@2.1.1005~postinstall: Args: [ '/d /s /c',
109 silly lifecycle 'node -e "/*PostInstall: Installs platform-specific .NET framework */try{require(\'./dist/app.js\')}catch(e){}"' ]
110 silly lifecycle dotnet-2.1@2.1.1005~postinstall: Returned: code: 1 signal: null
111 info lifecycle dotnet-2.1@2.1.1005~postinstall: Failed to exec postinstall script
112 timing action:postinstall Completed in 413ms
113 verbose unlock done using C:\Users\Eotten\AppData\Roaming\npm-cache\_locks\staging-83d89485cd196565.lock for C:\Users\Eotten\AppData\Roaming\npm\node_modules\.staging
114 timing stage:rollbackFailedOptional Completed in 19ms
115 timing stage:runTopLevelLifecycles Completed in 2628ms
116 verbose stack Error: dotnet-2.1@2.1.1005 postinstall: `node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"`
116 verbose stack Exit status 1
116 verbose stack at EventEmitter.
Oops, accidentally closed the issue but I didn't mean to..
@fearthecowboy, any ideas? I tried installing on node 12 and worked fine for me. @EdwinOtten copied the entries from the log above. Thanks!
This is a different issue -- I think it's failing for some other reason.
let's try just the .net framework package:
In an powershell prompt:
# clean out anything that might be there
rmdir -recurse $home/.net
$env:debug=1
$env:NO_NET_SDK=1
npm cache clear --force
npm install -g dotnet-2.1
and it should dump out a bunch of debugging data.
Thanks! I solved the issue 😄
By setting $env:debug=1
and $env:debug=1
I got some more info on the issue:
Creating base path: C:\Users\Eotten\.net\2.1
{"type":"info","data":"No lockfile found."}
{"type":"step","data":{"message":"Resolving packages","current":1,"total":4}}
{"type":"activityStart","data":{"id":0}}
{"type":"activityTick","data":{"id":0,"name":"dotnet-2.1-win-x64"}}
{"type":"error","data":"An unexpected error occurred: \"https://registry.npmjs.org/dotnet-2.1-win-x64: unable to get local issuer certificate\"."}
{"type":"info","data":"If you think this is a bug, please open a bug report with the information provided in \"C:\\\\Users\\\\Eotten\\\\.net\\\\2.1\\\\yarn-error.log\"."}
{"type":"info","data":"Visit \u001b[1mhttps://yarnpkg.com/en/docs/cli/add\u001b[22m for documentation about this command."}
Unable to install/use dotnet framework.
Based on the error above I discovered that dotnet-2.1 uses yarn to install some other packages, which runs into issues with our corporate firewall/proxy setup.
I've had the unable to get local issuer certificate error before, when using NPM. I already had a .npmrc file to make NPM work with our proxy. So after finding out about the use of yarn, I also added a .yarnrc file with strict-ssl false
. This solved the issue for me.
@fearthecowboy It might be a good idea to mention the use of yarn in the readme of dotnet, for those of us struggling with corporate proxies... What's your opinion on this?
Ah. Good to know.
Yeah, I can add that to the readme.
FWIW, I had to use Yarn -- using NPM programatically is fraught with pain and suffering.
@EdwinOtten, @fearthecowboy, thank you!! @EdwinOtten, closing this issue. 👍
FWIW, I had to use Yarn -- using NPM programatically is fraught with pain and suffering.
It's not that I'm against using Yarn. I just didn't look for a solution in that direction.. until I noticed yarn in the debug logs :wink:
Thanks to both of you for spending time on this and helping me out! :+1: :tada:
Sorry, but I still do not understand how to solve this. I have the same issue. In my case, the botdispatch does not install at all
@edwardtsbaum, could you try this from @EdwinOtten comment above?
“I've had the unable to get local issuer certificate error before, when using NPM. I already had a .npmrc file to make NPM work with our proxy. So after finding out about the use of yarn, I also added a .yarnrc file with strict-ssl false. This solved the issue for me.”
I saw that comment, but I do not understand how to add a .yarnrc file to NPM.
@EdwinOtten, could you help @edwardtsbaum? Where should .yarnrc be created and what should be in there? Thank you!
I added a .yarnrc file and it still does not work. It installs globally but it does not allow me to use any dispatch commands except for dispatch --version. it fails to install locally because it is unable to install/use dotnet framework. here is another screenshot of what it looks like
this is what it looks like when i try to install botdispatch using the yarn
i need some help, If anyone is out there.
I feel like I have done everything. I have uninstalled and installed .net runtimes and sdks, I am all out of tricks if there is anyone that can help me that would be greatly appreciated.
@edwardtsbaum, what's in your .yarnrc and where you put it? @fearthecowboy, any ideas?
I haven't gotten back to this quite yet, but maybe we can do a quick workaround:
# turn on debug mode so we get more messages.
set debug=1
# let's install yarn so we can easily configure it.
npm install -g yarn
# set strict-ssl to false
yarn config set strict-ssl false
# try to install the dotnet package
npm install -g dotnet-2.1
Thanks guys for the help. I could not figure out what my problem was but I figured there was a dependency issue with the dot net cli I had installed. I backed up my system and cleaned my drives and reinstalled dot net and node.js and reinstalled botdispatch and finally got it working.
On Mon, Jan 6, 2020, 5:47 PM Garrett Serack notifications@github.com wrote:
I haven't gotten back to this quite yet, but maybe we can do a quick workaround:
turn on debug mode so we get more messages.
set debug=1
let's install yarn so we can easily configure it.
npm install -g yarn
set strict-ssl to false
yarn config set strict-ssl false
try to install the dotnet package
npm install -g dotnet-2.1
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/botbuilder-tools/issues/1352?email_source=notifications&email_token=AKUN2SVOSV76E47EF5I5J53Q4OYJZA5CNFSM4JITMMJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIHBWNQ#issuecomment-571349814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKUN2SVGOMMTC2XX25IP423Q4OYJZANCNFSM4JITMMJQ .
@fearthecowboy, thanks for the instructions! @edwardtsbaum, glad to hear you got it working. Thanks!
Hello - I am still getting this issue. I am on mac, with npm 6.14.4 and dotnet 3.1.300.
Should I remove dotnet sdk 3.1.3 and install 2.1?
thanks!
@srajanpm, try removing dotnet 3.1.3. Dispatch CLI is using dotnet 2.1.
Try turning on debugging to get more messages in the log (see above thread):
set debug=1
npm install -g yarn
yarn config set strict-ssl false
npm install -g dotnet-2.1
thanks @tsuwandy
I uninstalled dotnet 3.1.3 and followed your steps above to install dotnet 2.1 and dotnet 2.1 install failed in the postinstall script.
Here is the log file:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'dotnet-2.1'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v12.16.3
4 verbose npm-session 67742a9a1b66a688
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/dotnet-2.1 11ms (from cache)
8 silly pacote tag manifest for dotnet-2.1@latest fetched in 21ms
9 timing stage:loadCurrentTree Completed in 35ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule dotnet-2.1@2.1.1005 checking installable status
17 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 3ms
18 timing stage:loadIdealTree Completed in 5ms
19 silly currentTree lib
20 silly idealTree lib
20 silly idealTree └── dotnet-2.1@2.1.1005
21 silly install generateActionsToTake
22 timing stage:generateActionsToTake Completed in 3ms
23 silly diffTrees action count 1
24 silly diffTrees add dotnet-2.1@2.1.1005
25 silly decomposeActions action count 8
26 silly decomposeActions fetch dotnet-2.1@2.1.1005
27 silly decomposeActions extract dotnet-2.1@2.1.1005
28 silly decomposeActions preinstall dotnet-2.1@2.1.1005
29 silly decomposeActions build dotnet-2.1@2.1.1005
30 silly decomposeActions install dotnet-2.1@2.1.1005
31 silly decomposeActions postinstall dotnet-2.1@2.1.1005
32 silly decomposeActions finalize dotnet-2.1@2.1.1005
33 silly decomposeActions refresh-package-json dotnet-2.1@2.1.1005
34 silly install executeActions
35 silly doSerial global-install 8
36 verbose correctMkdir /Users/srajan/.npm/_locks correctMkdir not in flight; initializing
37 verbose lock using /Users/srajan/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
38 silly doParallel extract 1
39 silly extract dotnet-2.1@2.1.1005
40 silly tarball trying dotnet-2.1@latest by hash: sha512-dwS5/msZNOBSfoIEmgvt3uxlx1MMiwMUxkiuyiuaMulM6gWmPlea5FyfWt4gdYjl1a5twKmeo748n8s9l13qtQ==
41 silly extract dotnet-2.1@latest extracted to /usr/local/lib/node_modules/.staging/dotnet-2.1-050e09d0 (88ms)
42 timing action:extract Completed in 91ms
43 silly doReverseSerial unbuild 8
44 silly doSerial remove 8
45 silly doSerial move 8
46 silly doSerial finalize 8
47 silly finalize /usr/local/lib/node_modules/dotnet-2.1
48 timing action:finalize Completed in 129ms
49 silly doParallel refresh-package-json 1
50 silly refresh-package-json /usr/local/lib/node_modules/dotnet-2.1
51 timing action:refresh-package-json Completed in 9ms
52 silly doParallel preinstall 1
53 silly preinstall dotnet-2.1@2.1.1005
54 info lifecycle dotnet-2.1@2.1.1005~preinstall: dotnet-2.1@2.1.1005
55 timing action:preinstall Completed in 1ms
56 silly doSerial build 8
57 silly build dotnet-2.1@2.1.1005
58 info linkStuff dotnet-2.1@2.1.1005
59 silly linkStuff dotnet-2.1@2.1.1005 has /usr/local/lib/node_modules as its parent node_modules
60 silly linkStuff dotnet-2.1@2.1.1005 is part of a global install
61 silly linkStuff dotnet-2.1@2.1.1005 is installed into a global node_modules
62 silly linkStuff dotnet-2.1@2.1.1005 is installed into the top-level global node_modules
63 verbose linkBins [
63 verbose linkBins {
63 verbose linkBins dotnet: 'dist/call.js',
63 verbose linkBins 'dotnet-run': 'dist/call.js',
63 verbose linkBins 'dotnet-run-2.1': 'dist/call.js',
63 verbose linkBins 'install-dotnet-runtime': 'dist/app.js',
63 verbose linkBins 'which-dotnet-runtime': 'dist/find.js',
63 verbose linkBins 'which-dotnet': 'dist/find.js'
63 verbose linkBins },
63 verbose linkBins '/usr/local/bin',
63 verbose linkBins true
63 verbose linkBins ]
64 timing action:build Completed in 41ms
65 silly doSerial global-link 8
66 silly doParallel update-linked 0
67 silly doSerial install 8
68 silly install dotnet-2.1@2.1.1005
69 info lifecycle dotnet-2.1@2.1.1005~install: dotnet-2.1@2.1.1005
70 timing action:install Completed in 1ms
71 silly doSerial postinstall 8
72 silly postinstall dotnet-2.1@2.1.1005
73 info lifecycle dotnet-2.1@2.1.1005~postinstall: dotnet-2.1@2.1.1005
74 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: unsafe-perm in lifecycle false
75 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/dotnet-2.1/node_modules/.bin:/usr/local/lib/node_modules/.bin:/Users/srajan/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
76 verbose lifecycle dotnet-2.1@2.1.1005~postinstall: CWD: /usr/local/lib/node_modules/dotnet-2.1
77 silly lifecycle dotnet-2.1@2.1.1005~postinstall: Args: [
77 silly lifecycle '-c',
77 silly lifecycle node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"
77 silly lifecycle ]
78 silly lifecycle dotnet-2.1@2.1.1005~postinstall: Returned: code: 1 signal: null
79 info lifecycle dotnet-2.1@2.1.1005~postinstall: Failed to exec postinstall script
80 timing action:postinstall Completed in 348ms
81 verbose unlock done using /Users/srajan/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
82 timing stage:rollbackFailedOptional Completed in 3ms
83 timing stage:runTopLevelLifecycles Completed in 682ms
84 verbose stack Error: dotnet-2.1@2.1.1005 postinstall: node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"
84 verbose stack Exit status 1
84 verbose stack at EventEmitter.node -e "/*PostInstall: Installs platform-specific .NET framework */try{require('./dist/app.js')}catch(e){}"
93 error Exit status 1
94 error Failed at the dotnet-2.1@2.1.1005 postinstall script.
94 error This is probably not a problem with npm. There is likely additional logging output above.
95 verbose exit [ 1, true ]
Tool
Name: Dispatch Version: 1.5.8 OS: Windows 10 Enterprise (10.0.18362 Build 18362) Installed .NET Core SDKs:
2.1.505
,2.1.508
,2.1.802
Describe the bug
When running any dispatch command (e.g.
dispatch refresh
,dispatch add
ordispatch --help
) the tool outputs: Unable to install/use dotnet framework.The only command that works is
dispatch --version
which returns 1.5.8 in my case.I already tried installing the latest .NET Core 2.1 SDK via dotnet.microsoft.com/downloads/dotnet-core/2.1 and then reinstall botdispatch using
npm i -g botdispatch
but that didn't help. I also read through issue #807 and tried most of the things suggested over there.To Reproduce
Steps to reproduce the behavior:
npm i -g botdispatch
dispatch init
Expected behavior
I expect the tool to work, or have more information about how to solve this issue.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
[bug]