nornagon / electron-minidump

Symbolicate Electron minidumps
51 stars 14 forks source link

Global installation fails with EACCES on linux #4

Open Plastikmensch opened 4 years ago

Plastikmensch commented 4 years ago

Running sudo npm install -g electron-minidump produces the following output:

> minidump@0.19.0 preinstall /usr/lib/node_modules/electron-minidump/node_modules/minidump
> node build.js

internal/fs/utils.js:298
    throw err;
    ^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/electron-minidump/node_modules/minidump/build'
    at Object.mkdirSync (fs.js:947:3)
    at Object.<anonymous> (/usr/lib/node_modules/electron-minidump/node_modules/minidump/build.js:7:6)
    at Module._compile (internal/modules/cjs/loader.js:1236:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10)
    at Module.load (internal/modules/cjs/loader.js:1085:32)
    at Function.Module._load (internal/modules/cjs/loader.js:950:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/usr/lib/node_modules/electron-minidump/node_modules/minidump/build'
}

Installation without -g flag works fine

Ben-Voris commented 2 years ago

The reason for this is probably obvious to those who understand npm, but, though the install worked without -g, the electron-minidump command was not found. For me, what worked is ~/node_modules/.bin/electron-minidump