npm node-libcurl install error on window. Please tell me how to solve it

294 Views Asked by At

I am trying to install node-libcurl on window for curl communication, but an error occurs. Even after installing Python 3.12, the following error occurs, I tried 'npm i node-pre-gyp --fallback-to-build', but it did not solve the problem. My installed version is node -v : v20.9.0 / npm -v :10.1.0


C:\Users\myname>npm i node-libcurl -g
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\node_modules\@mapbox\node-pre-gyp'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\node_modules\\@mapbox\\node-pre-gyp'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\node_modules',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\node_modules\node-gyp\test\fixtures\nodedir\include'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\node_modules\\node-gyp\\test\\fixtures\\nodedir\\include'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\node_modules\node-gyp\test\fixtures\nodedir'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\node_modules\\node-gyp\\test\\fixtures\\nodedir'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\lib\binding\node_libcurl.node --module_name=node_libcurl --module_path=C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\lib\binding\node_libcurl.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/JCMais/node-libcurl/releases/download/v3.0.0/node_libcurl-v3.0.0-node-v115-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/JCMais/node-libcurl/releases/download/v3.0.0/node_libcurl-v3.0.0-node-v115-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v115 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/JCMais/node-libcurl/releases/download/v3.0.0/node_libcurl-v3.0.0-node-v115-win32-x64-unknown.tar.gz
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 ok
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.0 found at "C:\Users\myname\AppData\Local\Programs\Python\Python312\python.exe"
npm ERR! gyp info find VS using VS2019 (16.11.33801.447) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\myname\AppData\Local\Programs\Python\Python312\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\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\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\build\\config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\myname\\AppData\\Local\\node-gyp\\Cache\\20.9.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\\myname\\AppData\\Local\\node-gyp\\Cache\\20.9.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\myname\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.9.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl',
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\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 42, in <module>
npm ERR!     import gyp  # noqa: E402
npm ERR!     ^^^^^^^^^^
npm ERR!   File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 9, in <module>
npm ERR!     import gyp.input
npm ERR!   File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in <module>
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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:325:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\lib\\binding\\node_libcurl.node" "--module_name=node_libcurl" "--module_path=C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\lib\\binding" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v115"
npm ERR! gyp ERR! cwd C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\lib\binding\node_libcurl.node --module_name=node_libcurl --module_path=C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\node-libcurl\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\myname\AppData\Roaming\npm\node_modules\node-libcurl
npm ERR! node-pre-gyp ERR! node -v v20.9.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok




Is there any solution?

0

There are 0 best solutions below