I’m returning to extension development after several years. I have an existing add-on to update. I’m trying to sort out the current documentation from the obsolete documentation. I started with
That told me to install web-ext with
npm install --global web-ext
I had to install “npm” first. I’m on Ubuntu 18.04 LTS. Large numbers of error messages came out about obsolete versions. (“Jetpack is no longer supported, etc.”) The debug log for the install has over 26,000 lines. The actual errors were
28897 warn optional Skipping failed optional dependency /web-ext/addons-linter/fsevents:
28898 warn notsup Not compatible with your operating system or architecture: fsevents@2.1.3
28899 warn optional Skipping failed optional dependency /web-ext/chokidar/fsevents:
28900 warn notsup Not compatible with your operating system or architecture: fsevents@2.1.3
28901 warn optional Skipping failed optional dependency /web-ext/watchpack-chokidar2/chokidar/fsevents:
28902 warn notsup Not compatible with your operating system or architecture: fsevents@1.2.13
28903 warn ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none was installed.
28904 warn ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none was installed.
28905 verbose stack Error: EACCES: permission denied, access '/usr/local/lib'
In the end, it failed because that script wants to be run as root. Allowing that mess to modify system files seems a bad idea.
Does the Mozilla Foundation guarantee that this tool can be trusted to run as root? How do I know there isn’t a backdoor in that mess?
Tried installing it without --global. Installation ran OK.
Attempted to run web-ext. Got
~/node_modules/web-ext/bin$ ./web-ext
/home/john/node_modules/camelcase/index.js:69
.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, (_, p1) => p1.toLocaleUpperCase())
^
SyntaxError: Invalid regular expression: /[_.\- ]+([\p{Alpha}\p{N}_]|$)/: Invalid escape
at camelCase (/home/john/node_modules/camelcase/index.js:69:3)
at A.command (/home/john/node_modules/web-ext/dist/web-ext.js:1:31702)
at Object.F [as main] (/home/john/node_modules/web-ext/dist/web-ext.js:1:36712)
at Object.<anonymous> (/home/john/node_modules/web-ext/bin/web-ext:7:8)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)