Closed arosesiejdev closed 7 months ago
this happened to me to i am guessing u are on windows (and sometime they forget that not everyone is on a mac) this is what i did
add this to the scripts section in the package.json
"preinstall-cli-win": "npm install",
"install-cli-win": "npm run build && npm install -g",
and then run:
npm run install-cli-win
this happened to me to i am guessing u are on windows (and sometime they forget that not everyone is on a mac) this is what i did
add this to the scripts section in the package.json
"preinstall-cli-win": "npm install", "install-cli-win": "npm run build && npm install -g",
and then run:
npm run install-cli-win
Hey thanks for replying. @pieterdnz I tried that and getting this error in my log file now
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:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'install-cli-win'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v14.0.0
4 verbose run-script [ 'preinstall-cli-win', 'install-cli-win', 'postinstall-cli-win' ]
5 info lifecycle widget-builder@0.0.1~preinstall-cli-win: widget-builder@0.0.1
6 verbose lifecycle widget-builder@0.0.1~preinstall-cli-win: unsafe-perm in lifecycle true
7 verbose lifecycle widget-builder@0.0.1~preinstall-cli-win: PATH: C:\Users\arose\AppData\Roaming\nvm\v14.0.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\arose\Desktop\widget-builder\node_modules\.bin;C:\Users\arose\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\arose\bin;C:\Program Files\Oculus\Support\oculus-runtime;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\Intel\Intel(R) Memory and Storage Tool;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\arose\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\arose\AppData\Local\Microsoft\WindowsApps;C:\Users\arose\AppData\Local\GitHubDesktop\bin;C:\Users\arose\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\arose\AppData\Roaming\npm;C:\Users\arose\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
8 verbose lifecycle widget-builder@0.0.1~preinstall-cli-win: CWD: C:\Users\arose\Desktop\widget-builder
9 silly lifecycle widget-builder@0.0.1~preinstall-cli-win: Args: [ '/d /s /c', 'npm install' ]
10 silly lifecycle widget-builder@0.0.1~preinstall-cli-win: Returned: code: 0 signal: null
11 info lifecycle widget-builder@0.0.1~install-cli-win: widget-builder@0.0.1
12 verbose lifecycle widget-builder@0.0.1~install-cli-win: unsafe-perm in lifecycle true
13 verbose lifecycle widget-builder@0.0.1~install-cli-win: PATH: C:\Users\arose\AppData\Roaming\nvm\v14.0.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\arose\Desktop\widget-builder\node_modules\.bin;C:\Users\arose\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\arose\bin;C:\Program Files\Oculus\Support\oculus-runtime;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\Intel\Intel(R) Memory and Storage Tool;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\arose\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\arose\AppData\Local\Microsoft\WindowsApps;C:\Users\arose\AppData\Local\GitHubDesktop\bin;C:\Users\arose\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\arose\AppData\Roaming\npm;C:\Users\arose\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
14 verbose lifecycle widget-builder@0.0.1~install-cli-win: CWD: C:\Users\arose\Desktop\widget-builder
15 silly lifecycle widget-builder@0.0.1~install-cli-win: Args: [ '/d /s /c', 'npm run build && npm install -g' ]
16 silly lifecycle widget-builder@0.0.1~install-cli-win: Returned: code: 2 signal: null
17 info lifecycle widget-builder@0.0.1~install-cli-win: Failed to exec install-cli-win script
18 verbose stack Error: widget-builder@0.0.1 install-cli-win: `npm run build && npm install -g`
18 verbose stack Exit status 2
18 verbose stack at EventEmitter.<anonymous> (C:\Users\arose\AppData\Roaming\nvm\v14.0.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
18 verbose stack at EventEmitter.emit (events.js:315:20)
18 verbose stack at ChildProcess.<anonymous> (C:\Users\arose\AppData\Roaming\nvm\v14.0.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
18 verbose stack at ChildProcess.emit (events.js:315:20)
18 verbose stack at maybeClose (internal/child_process.js:1051:16)
18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
19 verbose pkgid widget-builder@0.0.1
20 verbose cwd C:\Users\arose\Desktop\widget-builder
21 verbose Windows_NT 10.0.19044
22 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "install-cli-win"
23 verbose node v14.0.0
24 verbose npm v6.14.4
25 error code ELIFECYCLE
26 error errno 2
27 error widget-builder@0.0.1 install-cli-win: `npm run build && npm install -g`
27 error Exit status 2
28 error Failed at the widget-builder@0.0.1 install-cli-win script.
28 error This is probably not a problem with npm. There is likely additional logging output above.
29 verbose exit [ 2, true ]
hey @arosesiejdev I was running into the same issue on Windows - I followed what @pieterdnz suggested and got it to work. Just wanted to make sure that when you are adding the lines of code that Pieter posted, you're adding it in the package.json file in the widget-builder directory, not the website root package.json file. Hope this helps!
What worked for me was changing the script like this: "install-cli": "npm install && npm run build && npm install -g"
Fixed via https://github.com/bigcommerce/widget-builder/pull/131, thank you for reporting the issue and apologies for the wait.
I am following the documentation instructions. I have cloned this repo, navigated to the widget-builder directory and can confirm I am using Node version 14.0.0 and NPM 16.4.
Upon trying to run the command below
npm run install-cli
I get the following error in the console
Below is the full log file: