1
votes

I have an electron project in which drivelist is used as a dependency. When I run "npm install", I get an error stating node-gyp\bin folder wasn't found. Whereas, I have node-gyp\bin in my node modules, and even in c:\programfiles\nodejs ...." as opposed to what this error states. I guess drivelist couldn't build from source code after installation. But, what is the walk arround ? I am stuck because of this.

[email protected] install C:\Users...\node_modules\drivelist prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.17.0 runtime=node arch=x64 libc= platform=win32)

C:\Users...\node_modules\drivelist>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin" rebuild ) internal/modules/cjs/loader.js:638 throw err; ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) npm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: prebuild-install || node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2020-03-27T15_58_03_598Z-debug.log

I don't know the cause of this error, since to me everything seems alright on my device, I went through every link I could find till now on the internet seeking for solution but I haven't found any solution yet. Please can anyone help ?

1

1 Answers

1
votes

maybe you can delete node_modules, then npm install angain because in my case it's work