Hello
I wanted to start contributing to Brave. Currently I’m using ubuntu 20.04. I cloned the brave-browser repo, installed dependencies and ran
npm run init
This script went for a while, and I’ve encountered an error, to which log I post down below:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'init' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preinit', 'init', 'postinit' ]
5 info lifecycle [email protected]~preinit: [email protected]
6 info lifecycle [email protected]~init: [email protected]
7 verbose lifecycle [email protected]~init: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~init: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/michal/brave-browser/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~init: CWD: /home/michal/brave-browser
10 silly lifecycle [email protected]~init: Args: [ '-c', 'node ./scripts/init.js' ]
11 silly lifecycle [email protected]~init: Returned: code: 1 signal: null
12 info lifecycle [email protected]~init: Failed to exec init script
13 verbose stack Error: [email protected] init: `node ./scripts/init.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/michal/brave-browser
16 verbose Linux 5.13.0-37-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "init"
18 verbose node v10.19.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] init: `node ./scripts/init.js`
22 error Exit status 1
23 error Failed at the [email protected] init script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
How can fix it?