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 npm@6.14.4
3 info using node@v10.19.0
4 verbose run-script [ 'preinit', 'init', 'postinit' ]
5 info lifecycle brave@1.39.9~preinit: brave@1.39.9
6 info lifecycle brave@1.39.9~init: brave@1.39.9
7 verbose lifecycle brave@1.39.9~init: unsafe-perm in lifecycle true
8 verbose lifecycle brave@1.39.9~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 brave@1.39.9~init: CWD: /home/michal/brave-browser
10 silly lifecycle brave@1.39.9~init: Args: [ '-c', 'node ./scripts/init.js' ]
11 silly lifecycle brave@1.39.9~init: Returned: code: 1 signal: null
12 info lifecycle brave@1.39.9~init: Failed to exec init script
13 verbose stack Error: brave@1.39.9 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 brave@1.39.9
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 brave@1.39.9 init: `node ./scripts/init.js`
22 error Exit status 1
23 error Failed at the brave@1.39.9 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?