javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

error when run npm install

Open hqzxjczx opened this issue 6 years ago • 1 comments

internal/modules/cjs/loader.js:638 throw err; ^

Error: Cannot find module '/usr/hqzxjczx/javascript-algorithms/node_modules/pre-commit/install.js' 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:829:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/sane/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 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":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node install.js 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! /root/.npm/_logs/2019-06-07T12_28_59_877Z-debug.log @trekhleb

hqzxjczx avatar Jun 07 '19 13:06 hqzxjczx

First of all install node (it will install npm automatically).

Install Node

Visit Node.js Download page and download pre-built installer for your platform https://nodejs.org/en/download/

Test Node

Open terminal and run node -v. This will show result like: v14.16.xx. When you get that also run npm -v and this will show something like 7.11.xx.

Last Step

only then you get above result navigate to the repo folder and run npm install.

saeedtlb avatar May 05 '21 08:05 saeedtlb