node.jsnpmnasmnode-libcurl

running NPM install command fails on nasm and libcurl errors


I went through all posts i could, installed packages 1 by 1 and even did a clean install of everything starting from nodeJS. The error im getting is:

npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\nan',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\nan\doc'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\nan\\doc'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\curl-for-windows\openssl\config\archs\solaris-x86-gcc\asm'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl\\curl-for-windows\\openssl\\config\\archs\\solaris-x86-gcc\\asm'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\curl-for-windows\openssl\config\archs\solaris64-x86_64-gcc'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl\\curl-for-windows\\openssl\\config\\archs\\solaris64-x86_64-gcc'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error code 1
npm error path C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm 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\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\lib\binding\node_libcurl.node --module_name=node_libcurl --module_path=C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using node-pre-gyp@1.0.11
npm error node-pre-gyp info using node@20.18.3 | win32 | x64
npm error node-pre-gyp info check checked for "C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\lib\binding\node_libcurl.node" (not found)
npm error node-pre-gyp http GET https://github.com/JCMais/node-libcurl/releases/download/v3.0.1-0/node_libcurl-v3.0.1-0-node-v115-win32-x64-unknown.tar.gz
npm error node-pre-gyp ERR! install response status 404 Not Found on https://github.com/JCMais/node-libcurl/releases/download/v3.0.1-0/node_libcurl-v3.0.1-0-node-v115-win32-x64-unknown.tar.gz
npm error node-pre-gyp WARN Pre-built binaries not installable for node-libcurl@3.0.1-0 and node@20.18.3 (node-v115 ABI, unknown) (falling back to source compile with node-gyp)
npm error node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/JCMais/node-libcurl/releases/download/v3.0.1-0/node_libcurl-v3.0.1-0-node-v115-win32-x64-unknown.tar.gz
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@20.18.3 | win32 | x64
npm error gyp info ok
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@20.18.3 | win32 | x64
npm error gyp info find Python using Python version 3.13.1 found at "C:\Python313\python.exe"
npm error gyp info find VS using VS2019 (16.11.35731.53) found at:
npm error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm error gyp info find VS run with --verbose for detailed information
npm error gyp info spawn C:\Python313\python.exe
npm error gyp info spawn args [
npm error gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'msvs',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl\\build\\config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Users\\test_user\\AppData\\Local\\node-gyp\\Cache\\20.18.3\\include\\node\\common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=C:\\Users\\test_user\\AppData\\Local\\node-gyp\\Cache\\20.18.3',
npm error gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\test_user\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.18.3\\\\<(target_arch)\\\\node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl\\build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error Error: Command failed: cd curl-for-windows && git submodule update --init && python configure.py
npm error Submodule 'curl' (https://github.com/curl/curl.git) registered for path 'curl'
npm error Submodule 'libssh2' (https://github.com/libssh2/libssh2.git) registered for path 'libssh2'
npm error Submodule 'zlib' (https://github.com/madler/zlib.git) registered for path 'zlib'
npm error Cloning into 'C:/Users/test_user/IdeaProjects/subsystem-tests/node_modules/node-libcurl/curl-for-windows/curl'...
npm error Cloning into 'C:/Users/test_user/IdeaProjects/subsystem-tests/node_modules/node-libcurl/curl-for-windows/libssh2'...
npm error Cloning into 'C:/Users/test_user/IdeaProjects/subsystem-tests/node_modules/node-libcurl/curl-for-windows/zlib'...
npm error Traceback (most recent call last):
npm error   File "C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\curl-for-windows\configure.py", line 151, in <module>
npm error     configure_defines( args )
npm error     ~~~~~~~~~~~~~~~~~^^^^^^^^
npm error   File "C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\curl-for-windows\configure.py", line 91, in configure_defines
npm error     raise Exception('nasm not found.')
npm error Exception: nasm not found.
npm error
npm error gyp: Call to 'node "C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl/scripts/retrieve-win-deps.js"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:297:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm error gyp ERR! System Windows_NT 10.0.22631
npm error 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\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl\\lib\\binding\\node_libcurl.node" "--module_name=node_libcurl" "--module_path=C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\node-libcurl\\lib\\binding" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v115"
npm error gyp ERR! cwd C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl
npm error gyp ERR! node -v v20.18.3
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error node-pre-gyp ERR! build error
npm error 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\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\lib\binding\node_libcurl.node --module_name=node_libcurl --module_path=C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm error node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
npm error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1104:16)
npm error node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm error node-pre-gyp ERR! System Windows_NT 10.0.22631
npm error node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\test_user\\IdeaProjects\\subsystem-tests\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm error node-pre-gyp ERR! cwd C:\Users\test_user\IdeaProjects\subsystem-tests\node_modules\node-libcurl
npm error node-pre-gyp ERR! node -v v20.18.3
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
npm error A complete log of this run can be found in: C:\Users\test_user\AppData\Local\npm-cache\_logs\2025-02-28T14_18_55_503Z-debug-0.log

My versions:

{
  integrationtest: '1.0.0',
  npm: '10.8.2',
  node: '20.18.3',
  acorn: '8.14.0',
  ada: '2.9.2',
  ares: '1.34.4',
  base64: '0.5.2',
  brotli: '1.1.0',
  cjs_module_lexer: '1.4.1',
  cldr: '45.0',
  icu: '75.1',
  llhttp: '8.1.2',
  modules: '115',
  napi: '9',
  nghttp2: '1.61.0',
  nghttp3: '0.7.0',
  ngtcp2: '1.1.0',
  openssl: '3.0.15+quic',
  simdutf: '5.6.4',
  tz: '2024b',
  undici: '6.21.1',
  unicode: '15.1',
  uv: '1.46.0',
  uvwasi: '0.0.21',
  v8: '11.3.244.8-node.25',
  zlib: '1.3.0.1-motley-82a5fec'
}

Machine: Windows 11 64 bit and using Git Bash for windows primarily.


Solution

  • SOLVED:

    The issue was in package.json i had libcurl on version 4.1.0 cause i wanted to go with latest but that version doesnt seem to work with Windows (yet, or maybe never), do downgrading to 4.0.0 fixed it all.