Open misterWiz opened 1 year ago
+1 Getting something very similar to verbose.txt on fairly clean windows10 install
Fails silently on macos as well
same fails silently on imac x86 and macbook M1
ditto. Fails on fresh images of node:8, ubuntu, with all above requirements installed. verbose.txt
Failing silently as well on Windows 11 with Node.js v18.13.0, Python 3.8.10, and all other requirements installed.
For me it helped installing dalai as an npm package as I got way more logs regarding failures this way.
same problem on ubuntu 20.04.6 LTS
It's probably silently failing because you're missing some build dependencies that it tries to install automatically, but can't if you're not using sudo. For instance, assuming that you already have node and python environments on Ubuntu, it also wants:
sudo apt-get install build-essential python3-venv
You can see what it's trying to do by first issuing npm install -g dalai
This is part of the error log:
1078 info run @cdktf/node-pty-prebuilt-multiarch@0.10.1-pre.10 postinstall { code: 0, signal: null }
1079 timing build:run:postinstall:node_modules/dalai/node_modules/@cdktf/node-pty-prebuilt-multiarch Completed in 54ms
1080 info run dalai@0.2.33 postinstall { code: 1, signal: null }
1081 timing reify:rollback:createSparse Completed in 151ms
1082 timing reify:rollback:retireShallow Completed in 0ms
1083 timing command:install Completed in 9069ms
1084 verbose stack Error: command failed
1084 verbose stack at ChildProcess.
It's probably silently failing because you're missing some build dependencies that it tries to install automatically, but can't if you're not using sudo. For instance, assuming that you already have node and python environments on Ubuntu, it also wants:
sudo apt-get install build-essential python3-venv
You can see what it's trying to do by first issuing
npm install -g dalai
Thanks, this got me closer! I added those two packages and now installation fails non-silently!
hidden@DESKTOP-Q2AI3TL:/mnt/c/WINDOWS/system32$ npx dalai install 7B Need to install the following packages: dalai@0.2.33 Ok to proceed? (y) mkdir /home/hidden/dalai { method: '7B', callparams: [] } /home/hidden/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/bin/cli.js:30 dalai[method](core, ...callparams).then(() => { ^
TypeError: dalai[method] is not a function
at Object.
Node.js v18.15.0
TL;DR for Windows
Setup fails on PowerShell call if it has a custom profile script that auto-launches on powershell's startup (obviously if the windows user hast created one, for instance, for formatting custom powershell prompt appearance, git detection and coloring, etc.), it could be fixed by using -NoLogo -NoProfile parameters set, but as of now, removing profile.ps1
from User's documents \ WindowsPowerShell directory allows it to setup Dalai without issues..
Similar issue happens on Windows 10 x64 19045.2728 on Node x64 v18.0.0 (npm 8.6.0) after MSBuild is executed and post-install.js
starts, and it just remain stuck at there:
npm timing reify:unpack Completed in 2588ms
npm timing reify:unretire Completed in 1ms
npm timing build:queue Completed in 17ms
npm timing build:link:node_modules/dalai Completed in 37ms
npm timing build:link:node_modules/ejs Completed in 37ms
npm timing build:link:node_modules/semver Completed in 38ms
npm timing build:link:node_modules/isomorphic-git Completed in 41ms
npm timing build:link:node_modules/ejs/node_modules/jake Completed in 41ms
npm timing build:link:node_modules/express/node_modules/mime Completed in 47ms
npm timing build:link:node_modules/isomorphic-git/node_modules/crc-32 Completed in 48ms
npm timing build:link:node_modules/tar/node_modules/mkdirp Completed in 48ms
npm timing build:link:node_modules/isomorphic-git/node_modules/sha.js Completed in 50ms
npm timing build:link Completed in 54ms
npm info run node-pty@0.10.1 install node_modules/node-pty node scripts/install.js
npm info run node-pty@0.10.1 install { code: 0, signal: null }
npm timing build:run:install:node_modules/node-pty Completed in 62790ms
npm timing build:run:install Completed in 62791ms
npm info run dalai@0.2.39 postinstall node_modules/dalai node setup
npm info run node-pty@0.10.1 postinstall node_modules/node-pty node scripts/post-install.js
npm info run node-pty@0.10.1 postinstall { code: 0, signal: null }
npm timing build:run:postinstall:node_modules/node-pty Completed in 167ms
[##################] - reify:terminal-kit: timing build:run:postinstall:node_modules/node-pty Completed in 167ms
And conhost.exe headless pipe remains there waiting. Nothing else happens, I have even many minutes each time using npm install dalai --verbose
BTW, I have installed Visual Studio 2022.
If I kill the PowerShell instance called this error shows:
Error Error: cannot install virtualenv
npm ERR! at Dalai.setup (C:\Users\vhanla\projects\python\alpaca\node_modules\dalai\index.js:342:15)
npm verb exit 1
npm timing npm Completed in 810784ms
npm verb unfinished npm timer reify 1679198149745
npm verb unfinished npm timer reify:build 1679198169274
npm verb unfinished npm timer build 1679198169275
npm verb unfinished npm timer build:deps 1679198169278
npm verb unfinished npm timer build:run:postinstall 1679198232148
npm verb unfinished npm timer build:run:postinstall:node_modules/dalai 1679198232148
npm verb code 1
npm ERR! A complete log of this run can be found in: log file
And reviewing the LOG file, it seems that the issue has to do with custom powershell profiles, It might be called not using -NoLogo -NoProfile
arguments in order to prevent this kind of issues, as this part of the LOG shows after terminating the powershell instance (which seems to be called from CMD, 'cause I'm not using powershell to call npm)
1092 verbose stack Error: command failed
1092 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
1092 verbose stack at ChildProcess.emit (node:events:527:28)
1092 verbose stack at maybeClose (node:internal/child_process:1090:16)
1092 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
1093 verbose pkgid dalai@0.2.39
1094 verbose cwd C:\Users\user10\projects\python\alpaca
1095 verbose Windows_NT 10.0.19045
1096 verbose node v18.0.0
1097 verbose npm v8.6.0
1098 error code 1
1099 error path C:\Users\user10\projects\python\alpaca\node_modules\dalai
1100 error command failed
1101 error command C:\WINDOWS\system32\cmd.exe /d /s /c node setup
1102 error mkdir C:\Users\user10\dalai
1102 error
1102 error downloading self contained python 0% / downloading self contained python 0% - downloading self contained python 0%[] in 5min downloading self contained python 3%[] in 10s downloading self contained python 24%[] in 1.5s downloading self contained python 61%[] in 0.4s downloading self contained python 85%[] in 0.1s downloading self contained python 100%[] done downloading self contained python 100%[] done extracting python
1102 error cleaning up temp files
1102 error exec: C:\Users\user10\dalai\python\python -m pip install --user virtualenv in undefined
1102 error [2J[m[HWindows PowerShell
1102 error Copyright (C) Microsoft Corporation. Todos los derechos reservados.
1102 error
1102 error Prueba la nueva tecnologÃa PowerShell multiplataforma https://aka.ms/pscore6]0;C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe[?25h[25l[6;1H[?25h[97mHello, user10! [25l[m[97m
Hello, user10! [91m♥ [m[20X
1102 error Today is: sábado, 18 de marzo de 2023[92m
1102 error Welcome to PowerShell version: 5[m [92m
1102 error I am: NVIDIAPC[m[23X
1102 error Let's program![23X[12;1H[?25h[97m[45mC:\Users\user10\projects\python\alpaca\node_modules\dalai[m[97m[45m
C:\Users\user10\projects\python\alpaca\node_modules\dalai[35m[49mî‚°[92m
1102 error $[93m[[m[56X28GB Free|419GB Used|[97m22:57:54[93m][92mλ[m ]0;PS >> User: user10 >> Current DIR: C:\Users\user10\projects\python\alpaca\node_modules\dalai[?25l[93mC:\Users\user10\dalai\python\python[m [90m-m[m pip install [90m--user[m virtualenv [?25h[25l[93m[13;35HC:\Users\user10\dalai\python\python[m [90m-m[m pip install [90m--user[m virtualenv [90m&&[m [93mexit[m
1102 error [?25h[91mEn lÃnea: 1 Carácter: 70[m[91m
1102 error + ... s\user10\dalai\python\python -m pip install --user virtualenv && exit[m[10X[91m
1102 error + ~~[m[15X[91m
1102 error El token '&&' no es un separador de instrucciones válido en esta versión.[m[12X[91m
1102 error + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
1102 error + FullyQualifiedErrorId : InvalidEndOfLine[m[39X[91m
1102 error [m[84X
1102 error [97m[45mC:\Users\user10\projects\python\alpaca\node_modules\dalai[m[97m[45m
C:\Users\user10\projects\python\alpaca\node_modules\dalai[35m[49mî‚°[92m
1102 error $[93m[[m28GB Free|[46X419GB Used|[97m22:57:55[93m][92mλ[m Error Error: cannot install virtualenv
1102 error at Dalai.setup (C:\Users\user10\projects\python\alpaca\node_modules\dalai\index.js:342:15)
1103 verbose exit 1
1104 timing npm Completed in 810784ms
1105 verbose unfinished npm timer reify 1679198149745
1106 verbose unfinished npm timer reify:build 1679198169274
1107 verbose unfinished npm timer build 1679198169275
1108 verbose unfinished npm timer build:deps 1679198169278
1109 verbose unfinished npm timer build:run:postinstall 1679198232148
1110 verbose unfinished npm timer build:run:postinstall:node_modules/dalai 1679198232148
1111 verbose code 1
1112 error A complete log of this run can be found in:
1112 error C:\Users\user10\AppData\Local\npm-cache\_logs\2023-03-19T03_55_49_523Z-debug-0.log
And I already have Python 3.8.6 x64 installed apart of what it seems it is using a self contained Python binary, and it doesn't require it as I have noticed it uses the virtualenv to use %USERPROFILE%\dalai directory for its own purposes.
And finally, as it seems powershell with custom user profiles has issues, I dunno from which node package's call, I tried removing my custom profile.ps1
file from %USERPROFILE%\Documents\WindowsPowerShell\ path, and retried, but it failed due to forced steps done before, but trying again with the node_modules
files removed (clean), it worked correctly.
1102 error $�[93m[�[m28GB Free|�[46X419GB Used|�[97m22:57:55�[93m]�[92mλ�[m Error Error: cannot install virtualenv
Dude/dudette, the afore indicates python venv is having an issue, try reinstalling-
sudo apt-get install python3-venv
Everyone having issues should try running the command with -ddd flag and read the resultant log files. E.g.-
npx -ddd dalai llama install 7B
READ IT CAREFULLY and look for "Error" strings it should give you really good idea whats going on, I'm no node.js expert, barely used this crappy s/w before but using these flags I have almost gotten everything working.
ALSO GREAT RESOURCE for WSL and Linux to unfu#k nodejs- https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-beginners-tutorial
Everyone having issues should try running the command with -ddd flag and read the resultant log files. E.g.-
npx -ddd dalai llama install 7B
READ IT CAREFULLY and look for "Error" strings it should give you really good idea whats going on, I'm no node.js expert, barely used this crappy s/w before but using these flags I have almost gotten everything working.
Big thanks for this. I kept getting the silent treatment. Put the flag in and found it it was already working
I am on a macbook, and I had to do npm install
first for the install model command to work.
I am attempting to install Dalai on a fresh WSL environment. I've installed all the listed requirements, plus:
cmake
curl
gcc
make
python3-pip
python-is-python3
Running
npx dalai install 7B
fails silently. I assume I'm missing a dependency? Attached is the output from runningnpx --verbose dalai install 7B
verbose.txt
Any ideas on what I still need to install?