curl-request icon indicating copy to clipboard operation
curl-request copied to clipboard

Error: Cannot find module 'node-pre-gyp'

Open vipulsolanki8466 opened this issue 6 years ago • 4 comments

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)

vipulsolanki8466 avatar Sep 08 '18 14:09 vipulsolanki8466

have you tried npm install node-libcurl --build-from-source ?

do-web avatar Jun 09 '19 12:06 do-web

How to fix the issue ? . And my npm version 6.4.1

chockuatm avatar Oct 05 '19 06:10 chockuatm

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.

ramgp avatar Nov 19 '19 23:11 ramgp

any fix of that issue yet ?

kollol-dev avatar May 11 '20 15:05 kollol-dev