curl-request
curl-request copied to clipboard
Error: Cannot find module 'node-pre-gyp'
Got error while running npm install curl-request --save
node-libcurl ERR! Error: Command failed: node "/Users/dev/Documents/project/node_modules/curl-request/node_modules/node-libcurl/lib/Curl.js"
module.js:471
throw err;
^
Error: Cannot find module 'node-pre-gyp'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/dev/Documents/project/node_modules/curl-request/node_modules/node-libcurl/lib/Curl.js:25:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
have you tried npm install node-libcurl --build-from-source ?
How to fix the issue ? . And my npm version 6.4.1
I think the reason is because it depends on node-libcurl@^1.2.0 which is pretty old. If your linux or OS version of libcurl is greater than 7.58 or so you will get the error.
e.g. on Ubuntu 18.04 it works which ships with [email protected], but on more recent versions of it a newer version of libcurl4 is used which leads to this error during install.
any fix of that issue yet ?