segment-boneyard / nightmare

A high-level browser automation library.
https://open.segment.com
19.54k stars 1.08k forks source link

npm error installing nightmareJS on linux, ubuntu, xubuntu, mint & lubuntu [partially solved] #1430

Open mrgab0 opened 6 years ago

mrgab0 commented 6 years ago

this is how the error looks like npm

$sudo npm i -S nightmare

electron@1.8.4 postinstall /home/gabriel/Documentos/practicas/nueva/node_modules/electron node install.js

/home/gabriel/Documentos/practicas/nueva/node_modules/electron/install.js:47 throw err ^

Error: EACCES: permission denied, # mkdir '/home/gabriel/Documentos/practicas/nueva/node_modules/electron/dist'

npm WARN nueva@1.0.0 No description npm WARN nueva@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron@1.8.4 postinstall: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron@1.8.4 postinstall 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! /home/gabriel/.npm/_logs/2018-04-14T13_22_51_277Z-debug.log

and for me this was the solution #sudo npm i -S nightmare --unsafe-perm=true --allow-root

ribafs commented 3 years ago

Aqui funcionou. Obrigado