1

I know this question is already asked, But I think my problem is different than the problems described in the already asked questions.

here is the output of npm install command

npm install output

here is the "/root/.npm/_logs/2018-07-12T14_14_35_726Z-debug.log" file

3304 silly saveTree | |   |   | +-- [email protected]
3304 silly saveTree | |   |   | `-- [email protected]
3304 silly saveTree | |   |   `-- [email protected]
3304 silly saveTree | |   +-- [email protected]
3304 silly saveTree | |   `-- [email protected]
3304 silly saveTree | `-- [email protected]
3304 silly saveTree +-- [email protected]
3304 silly saveTree +-- [email protected]
3304 silly saveTree `-- [email protected]
3305 warn [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
3306 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
3307 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
3309 verbose stack Error: [email protected] postinstall: `node scripts/build.js`
3309 verbose stack Exit status 1
3309 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
3309 verbose stack     at emitTwo (events.js:126:13)
3309 verbose stack     at EventEmitter.emit (events.js:214:7)
3309 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
3309 verbose stack     at emitTwo (events.js:126:13)
3309 verbose stack     at ChildProcess.emit (events.js:214:7)
3309 verbose stack     at maybeClose (internal/child_process.js:925:16)
3309 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
3310 verbose pkgid [email protected]
3311 verbose cwd /home/amarjit/Documents/localhost/laraveys
3312 verbose Linux 4.15.0-23-generic
3313 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
3314 verbose node v8.11.3
3315 verbose npm  v6.1.0
3316 error code ELIFECYCLE
3317 error errno 1
3318 error [email protected] postinstall: `node scripts/build.js`
3318 error Exit status 1
3319 error Failed at the [email protected] postinstall script.
3319 error This is probably not a problem with npm. There is likely additional logging output above.
3320 verbose exit [ 1, true ]
1
  • Could you add links to the questions that have already been asked and why you think your situation is different? Commented Jul 12, 2018 at 14:50

2 Answers 2

1

I found a solution, I think the issue was regarding permissions of all files in node_modules directory. So I just ran

sudo chmod -R a+rwx ./node_modules
Sign up to request clarification or add additional context in comments.

Comments

0

For me it was installing nodejs-legacy. Type node -v and if that returns an error:

apt install nodejs-legacy

Should do the trick. Happy coding!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.