[FIXED] Use VueJS with Laravel – npm install error

Issue

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 | |   |   | +-- pify@2.3.0
3304 silly saveTree | |   |   | `-- strip-bom@3.0.0
3304 silly saveTree | |   |   `-- path-type@2.0.0
3304 silly saveTree | |   +-- which-module@2.0.0
3304 silly saveTree | |   `-- yargs-parser@7.0.0
3304 silly saveTree | `-- yargs@8.0.2
3304 silly saveTree +-- lodash@4.17.10
3304 silly saveTree +-- popper.js@1.14.3
3304 silly saveTree `-- vue@2.5.16
3305 warn ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
3306 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
3307 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: 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: node-sass@4.9.2 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 node-sass@4.9.2
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 node-sass@4.9.2 postinstall: `node scripts/build.js`
3318 error Exit status 1
3319 error Failed at the node-sass@4.9.2 postinstall script.
3319 error This is probably not a problem with npm. There is likely additional logging output above.
3320 verbose exit [ 1, true ]

Solution

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

Answered By – Amarjit Singh

Answer Checked By – Timothy Miller (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published