shrink-ray
shrink-ray copied to clipboard
Node v16.2.0 Fails To Install Shrink-Ray-Current On Windows 10
Attempting to install dev dependencies with node version 16.2.0 or higher results in the following error with the package iltorb which has been archived / abandoned.
npm ERR! code 1
npm ERR! path E:\Repos\x\node_modules\iltorb
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./scripts/install.js || node-gyp rebuild
npm ERR! info install installing standalone, skipping download.
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 ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:326:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Repos\x\\node_modules\\iltorb\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd E:\Repos\x\node_modules\iltorb
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
Facing same problem.
I have the same issue to using node 16.14.0 but the error is slightly different:
npm ERR! D:\Git\Corendon\BitBucket\corendon.web.ui2\node_modules\nan\nan.h(58,10): fatal error C1083: Cannot open include file: 'node.h': No such file or directory [D:\Git\Corendon\BitBucket\corendon.web.ui2\node_modules\iltorb\build\iltorb.vcxproj] npm ERR! info install installing standalone, skipping download. 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.10.2 found at "C:\Python310\python.exe" npm ERR! gyp info find VS using VS2019 (16.11.32106.194) found at: npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn C:\Python310\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'D:\\Git\\Corendon\\BitBucket\\corendon.web.ui2\\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 'D:\\Git\\Corendon\\BitBucket\\corendon.web.ui2\\node_modules\\iltorb\\build\\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'D:\\Git\\Corendon\\BitBucket\\corendon.web.ui2\\node_modules\\node-gyp\\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\\Users\\c.butiurca\\AppData\\Local\\node-gyp\\Cache\\16.14.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\\c.butiurca\\AppData\\Local\\node-gyp\\Cache\\16.14.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=D:\\Git\\Corendon\\BitBucket\\corendon.web.ui2\\node_modules\\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\c.butiurca\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.14.0\\\\<(target_arch)\\\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\\Git\\Corendon\\BitBucket\\corendon.web.ui2\\node_modules\\iltorb', 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 'D:\\Git\\Corendon\\BitBucket\\corendon.web.ui2\\node_modules\\iltorb\\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\BuildTools\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\BuildTools\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (D:\Git\Corendon\BitBucket\corendon.web.ui2\node_modules\node-gyp\lib\build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520: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.19043 npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Git\\Corendon\\BitBucket\\corendon.web.ui2\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd D:\Git\Corendon\BitBucket\corendon.web.ui2\node_modules\iltorb npm ERR! gyp ERR! node -v v16.14.0 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok
If I add the optional dependencies to the package.json for iltorb and node-zopfli-es like it is mentioned in the docs then I also get the error with the print.
I think this is because building this is dependent upon Python 2.7, which is long deprecated. I've run into this same problem on macOS after installing 12.3, because Python 2.7 was removed.