Jhipster uml installation issue on windows : NPM fails on msbuild.exe with exit code 1 - npm

Hi I have been trying to install jhipster-uml using yarn and npm tool. But end up in error. Earlier had to down version Python from 3.6 to 2.7 to meet the npm demand. Also as per some post got windows visual studio installed using npm.
Still the problem persists. Please find the error below. Let me know any one has landed in a similar situation and has solved it ?
My machine is a windows 10 running on Intel i5 core 8 gb ram.
Let me know if more details are required from my side.
Update:
Tried steps from the site did not help much. Here I could not
install npm install bcrypt --save faild with same error
Also as pointed out in issue post here Have installed windows
build tool and python. npm install --global --production
windows-build-tools but this installed with success.
For yarn global add jhipster-uml
C:\Windows>yarn global add jhipster-uml
yarn global v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠁ deasync: Build failed
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
error C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments:
Directory: C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync
Output:
C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync>if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp#3.6.2
gyp info using node#9.3.0 | win32 | x64
gyp info spawn C:\Users\ameya.shetti\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\ameya.shetti\\AppData\\Local\\Yarn\\config\\global\\node_modules\\deasync\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\ameya.shetti\\.node-gyp\\9.3.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\ameya.shetti\\.node-gyp\\9.3.0',
gyp info spawn args '-Dnode_gyp_dir=D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\ameya.shetti\\.node-gyp\\9.3.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\ameya.shetti\\AppData\\Local\\Yarn\\config\\global\\node_modules\\deasync',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\my.pc\\AppData\\Local\\Yarn\\config\\global\\node_modules\\deasync\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync\build\deasync.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ameya.shetti\AppData\Local\Yarn\config\global\node_modules\deasync
gyp ERR! node -v v9.3.0
For npm install -g jhipster-uml
C:\Windows>npm install -g jhipster-uml
C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync\build\deasync.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ameya.shetti\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ameya.shetti\AppData\Roaming\npm\node_modules\jhipster-uml\node_modules\deasync
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deasync#0.1.9 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deasync#0.1.9 install 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\ameya.shetti\AppData\Roaming\npm-cache\_logs\2017-12-20T04_45_39_859Z-debug.log

Finally got it solved
I actually parked the above issue and was trying to install jhipster-registry-master for jhipster microservice when I landed on the same issue. So was retried all the steps that did not work before. Got it solved this time
So my observation to solve the above problem was
1. npm install --global --production windows-build-tools using Command prompt (ADMIN) [Right click on start menu (win 10) to find the option in the list.]
This installs python 2.7 and vc studio 2015. Even if you install python and set path in environment variable the npm won't detects until you follow this step.
2. Use the same admin power shell to run the yarn command on the jhipster-registry-master and it executed successfully. Used the same power shell to instal jhipster-uml using yarn global add jhipster-uml
This worked
Conclusion: For jhipster-uml to work it needs the ms visual studio dependency and admin privileges to run some .cp files using the windows build tool.

Related

Trying to run npm install- getting errors

I am following a tutorial on creating an ERC20 and ICO Dapp University ERC20 and ICO
I am trying to run npm install and getting this error -
npm ERR! code 1
npm ERR! path C:\Users\Foxy098\Desktop\Coding\WhiteCryptoICO\node_modules\sha3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR! addon.cpp
npm ERR! C:\Users\Foxy098\AppData\Local\node-gyp\Cache\16.15.0\include\node\node.h(63,10): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [C:\Users\Foxy098\Desktop\Coding\WhiteCryptoICO\node_modules\sha3\build\sha3.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#16.15.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Users\Foxy098\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp info find VS using VS2022 (17.2.32516.85) found at:
npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Foxy098\AppData\Local\Programs\Python\Python310\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Users\\Foxy098\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\Foxy098\\Desktop\\Coding\\WhiteCryptoICO\\node_modules\\sha3\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\Foxy098\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\Foxy098\\AppData\\Local\\node-gyp\\Cache\\16.15.0\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\Foxy098\\AppData\\Local\\node-gyp\\Cache\\16.15.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Foxy098\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\Foxy098\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.15.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Foxy098\\Desktop\\Coding\\WhiteCryptoICO\\node_modules\\sha3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\Users\\Foxy098\\Desktop\\Coding\\WhiteCryptoICO\\node_modules\\sha3\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Users\Foxy098\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Foxy098\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Foxy098\Desktop\Coding\WhiteCryptoICO\node_modules\sha3
npm ERR! gyp ERR! node -v v16.15.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Foxy098\AppData\Local\npm-cache\_logs\2022-05-26T08_27_58_965Z-debug-0.log
I also tried this : npm install --global windows-build-tools
and I also tried : npm install --global --production windows-build-tools
Still got errors for both.
Any ideas?
I think you installed packages with two different node version.

yarn failing from a node-gyp bug

I am trying to run yarn --ignore-engines on my project. I am getting this error message:
error C:\Users\Jerome\mono\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: C:\Users\Jerome\mono\node_modules\node-sass
Output:
Building: C:\Program Files (x86)\nodejs\node.exe C:\Users\Jerome\mono\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Program Files (x86)\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp#3.8.0
gyp info using node#16.2.0 | win32 | ia32
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Users\Jerome\.windows-build-tools\python27\python.exe" in the PATH
gyp verb `which` succeeded C:\Users\Jerome\.windows-build-tools\python27\python.exe C:\Users\Jerome\.windows-build-tools\python27\python.exe
gyp verb check python version `C:\Users\Jerome\.windows-build-tools\python27\python.exe -c "import sys; print "2.7.15
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 16.2.0
gyp verb command install [ '16.2.0' ]
gyp verb install input version string "16.2.0"
gyp verb install installing version: 16.2.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 16.2.0
gyp verb build dir attempting to create "build" dir: C:\Users\Jerome\mono\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? C:\Users\Jerome\mono\node_modules\node-sass\build
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.19041
gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
gyp verb find vs2017 - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017 - Using this installation with Windows 10 SDK
gyp verb find vs2017 using installation: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\Jerome\mono\node_modules\node-sass\build\config.gypi
(node:12932) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp verb config.gypi checking for gypi file: C:\Users\Jerome\mono\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\Jerome\mono\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Users\Jerome\.windows-build-tools\python27\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2015',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Jerome\\.node-gyp\\16.2.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Jerome\\.node-gyp\\16.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\Jerome\\.node-gyp\\16.2.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\Jerome\\mono\\node_modules\\node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture ia32
gyp verb node dev dir C:\Users\Jerome\.node-gyp\16.2.0
gyp verb found first Solution file build/binding.sln
gyp verb using MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=Win32'
gyp info spawn args ]
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
gyp ERR! stack at onErrorNT (node:internal/child_process:480:16)
gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Jerome\mono\node_modules\node-sass
gyp ERR! node -v v16.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
From some other SO posts I believe the cause of this is because I have not installed windows-build-tools properly. Although when I try to run npm i -g windows-build-tools it idles for over an hour and never executes.
C:\Users\Jerome\mono>npm install --global windows-build-tools
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[ ] - reify:resolve: timing reifyNode:node_modules/windows-build-tools/node_modules/ajv Completed in 357ms
Turns out we had two versions of Visual Studio Build Tools installed: 2017 and 2019. Steps to fix were:
Windows key
Add or remove programs
Scroll down to Visual Studio Build Tools 2019
Uninstall
This is due to nod-sass incompatibility.
It is better to install the sass instead of node-sass.
To solve this problem, follow the steps below in order:
delete node-sass from the package.json
run npm install or yarn
npm install sass

How to solve npm install errors on Mac

I purchased a template online for a Gatsby JS website and when I tried to use it, it worked, but then it just stopped. I tried opening the project in a new directory and it failed.
Currently I am unable to run npm install for the project and have no idea how to solve the issue.
The error messages are:
npm ERR! code 1
npm ERR! path /Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! info sharp Using cached /Users/chistopherholder/.npm/_libvips/libvips-8.10.0-darwin-x64.tar.br
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#14.15.5 | darwin | x64
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/sharp/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/chistopherholder/.node-gyp/14.15.5/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/chistopherholder/.node-gyp/14.15.5',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/chistopherholder/.node-gyp/14.15.5/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/sharp',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR!
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Darwin 20.3.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/sharp
npm ERR! gyp ERR! node -v v14.15.5
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/chistopherholder/.npm/_logs/2021-03-05T00_04_39_680Z-debug.log
I opened up the debug.log but it is a 1787 lines of code that I don't quite understand.
I also tried sudo npm install.
How can I solve these issues?
Any hint in the right direction would be much appreciated. I am usually working with django and not react so I am a bit clueless here.
It may not be the same issue in every case, but whenever I see the npm ERR! gyp: No Xcode or CLT version detected! I have to remove xcode and reinstall, then the error goes away. My best guess is that it's an issue with Node and/or MacOs updates that cause conflicts.
When this happens you can first try:
sudo xcode-select --reset
And if that doesn't work (which it never has for me) you can then try:
sudo rm -rf $(xcode-select -print-path) && xcode-select --install
This does not seem to be like the correct way of fixing it but I would love to have someone explain a better way to fix this type of issues.
Basically I uninstalled and reinstalled nodejs with brew.
brew uninstall node
brew install node
brew cleanup
Rean
npm install -g npm
Then reset the project back to the beginning and restarted my computer.
Now it works but I don't understand what went wrong and i'm sure I will run into the issue again.
Maybe I should be running this in a Pipenv shell

Long error while installing #wdio/cucumber-framework in Windows

I'm trying to install #wdio/cucumber-framework but I get quite a long error. I have tried to install windows-build-tools. I have also installed Visual C++ build tools for Visual Studio 2019.
Here is my output:
~\source\repos\myapp> npm install #wdio/cucumber-framework
npm WARN deprecated cucumber#6.0.5: The npm package has moved to #cucumber/cucumber
npm ERR! code 1
npm ERR! path C:\xxxx\source\repos\myapp\node_modules\fibers
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node build.js || nodejs build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#14.15.4 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.1 found at "C:\xxxx\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
npm ERR! gyp info find VS using VS2019 (16.8.30907.101) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\xxxx\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\xxxx\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\xxxx\\source\\repos\\myapp\\node_modules\\fibers\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\xxxx\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\xxxx\\AppData\\Local\\node-gyp\\Cache\\14.15.4\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\xxxx\\AppData\\Local\\node-gyp\\Cache\\14.15.4',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\xxxx\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\xxx\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.15.4\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\xxxx\\source\\repos\\myapp\\node_modules\\fibers',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\xxxx\\source\\repos\\myapp\\node_modules\\fibers\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 3221225477
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\xxxx\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19041
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\xxxx\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd C:\xxxx\source\repos\myapp\node_modules\fibers
npm ERR! gyp ERR! node -v v14.15.4
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-gyp exited with code: 1
npm ERR! Please make sure you are using a supported platform and node version. If you
npm ERR! would like to compile fibers on this machine please make sure you have setup your
npm ERR! build environment--
npm ERR! Windows + OS X instructions here: https://github.com/nodejs/node-gyp
npm ERR! Ubuntu users please run: `sudo apt-get install g++ build-essential`
npm ERR! Alpine users please run: `sudo apk add python make g++`
npm ERR! 'nodejs' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\xxxx\AppData\Local\npm-cache\_logs\2021-02-05T12_32_34_788Z-debug.log
What am I doing wrong? Is there something with Visual Studio? Is the Node version 14.15.4 not supported? Is there something with node-gyp?
What should I do to make this pass?
Install node-gyp globally and follow steps for windows documented
https://www.npmjs.com/package/node-gyp

Setting up hubot on an openfire server

I'm running Ubuntu and I am trying to get a hubot to connect to my local openfire server. I followed the tutorial here, and everything went pretty smooth till toward the end, after editing the dependencies, I run npm install and receive two warnings:
npm WARN package.json node-xmpp#0.3.2 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
> node-stringprep#0.1.11 install /opt/hubot/my-bot/node_modules/node-stringprep
> node-gyp rebuild
I'm not sure what it means that the repositories arn't supported and I tried npm install node-stringprep and a node-gyp rebuild. The npm install gives me the same warnings, but finishes succesfully, while the rebuild gives me this error output:
gyp info it worked if it ends with ok
gyp info using node-gyp#0.12.1
gyp info using node#0.10.23 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/opt/hubot/my-bot/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/jake/.node-gyp/0.10.23/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/jake/.node-gyp/0.10.23',
gyp info spawn args '-Dmodule_root_dir=/opt/hubot/my-bot',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /opt/hubot/my-bot)
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.0-34-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/hubot/my-bot
gyp ERR! node -v v0.10.23
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
Since they are warnings and not errors(on the npm install), I went ahead and started hubot to see if it would connect but it doesn't. I don't get any errors from it but it doesn't connect. The output when I run the bot:
jake#jake-Lenovo-G580:/opt/hubot/my-bot$ ./bin/hubot --adapter xmpp
npm WARN package.json node-xmpp#0.3.2 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
> node-stringprep#0.1.11 install /opt/hubot/my-bot/node_modules/node-stringprep
> node-gyp rebuild
make: Entering directory `/opt/hubot/my-bot/node_modules/node-stringprep/build'
CXX(target) Release/obj.target/node_stringprep/node-stringprep.o
SOLINK_MODULE(target) Release/obj.target/node_stringprep.node
SOLINK_MODULE(target) Release/obj.target/node_stringprep.node: Finished
COPY Release/node_stringprep.node
make: Leaving directory `/opt/hubot/my-bot/node_modules/node-stringprep/build'
[Mon Dec 30 2013 13:39:23 GMT-0700 (MST)] INFO { username: 'hubot',
password: 'asdf',
host: '127.0.0.1',
port: '9090',
rooms: [ { jid: 'hubot-test', password: false } ],
keepaliveInterval: 30000 }
And nothing happens.
I double checked all the hubot xmpp fields several times to make sure they are correct, and although this particular output does not have it, I tried several variations of usernames -> hubot#jake-lenovo-g580 and hubot#jake-Lenovo-G580, so that it matches my domain.
Any help much appreciated.