Reputation: 1
Am facing npm errors while doing npm i command find the error below. my current node-gyp version is v10.1.0 . but here in error trying v8.4.1 can anyone help meenter image description here
pm 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 [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.12.3 found at "C:\Python312\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.34830.200) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python312\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\C5338469\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\C5338469\Documents\SSCUI_API\x4-bc-uat\node_modules\fibers\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\C5338469\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\C5338469\AppData\Local\node-gyp\Cache\14.21.3\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\C5338469\AppData\Local\node-gyp\Cache\14.21.3',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\C5338469\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\C5338469\\AppData\\Local\\node-gyp\\Cache\\14.21.3\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\C5338469\Documents\SSCUI_API\x4-bc-uat\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:\Users\C5338469\Documents\SSCUI_API\x4-bc-uat\node_modules\fibers\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR! File "C:\Users\C5338469\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 42, in
npm ERR! import gyp # noqa: E402
npm ERR! ^^^^^^^^^^
npm ERR! File "C:\Users\C5338469\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 9, in
npm ERR! import gyp.input
npm ERR! File "C:\Users\C5338469\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in
npm ERR! from distutils.version import StrictVersion
npm ERR! ModuleNotFoundError: No module named 'distutils'
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 (C:\Users\C5338469\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:259:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22631
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\C5338469\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd C:\Users\C5338469\Documents\SSCUI_API\x4-bc-uat\node_modules\fibers
npm ERR! gyp ERR! node -v v14.21.3
npm ERR! gyp ERR! node-gyp -v v8.4.1
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! RHEL users please run: yum install gcc-c++
and yum groupinstall 'Development Tools'
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:\Users\C5338469\AppData\Local\npm-cache_logs\2024-05-22T06_21_24_500Z-debug-0.log
when i clone the latest code from git onwards am facing this issue..i have same code which is cloned last week is wrking fine with npm i command. what happened in between is not sure
Upvotes: 0
Views: 367