I am trying my hand at building a simple extension for Firefox, but got the following error when running web-ext run
:
Error: not found: firefox
at F (/usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/which/which.js:63:19)
at E (/usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/which/which.js:72:29)
at /usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/which/which.js:81:16
at /usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/isexe/index.js:44:5
at /usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/isexe/access.js:8:5
at FSReqCallback.oncomplete (node:fs:198:23)
NOTE: I am running this in Ubuntu Linux subsystem for Windows 10. Not sure if that affects anything, but that's why the directory structures are a bit weird. I've also tried running the same commands on Firefox Developer Edition with the same results.
I tried the following commands:
web-ext run -v
web-ext run -v --firefox="C:\Program Files\Mozilla Firefox\firefox.exe"
These give the following response:
[/usr/local/lib/node_modules/web-ext/lib/program.js][info] Version: 7.6.2
[/usr/local/lib/node_modules/web-ext/lib/program.js][debug] Discovering config files. Set --no-config-discovery to disable
[/usr/local/lib/node_modules/web-ext/lib/config.js][debug] Discovered config "/home/knuffle98/.web-ext-config.js" does not exist or is not readable
[/usr/local/lib/node_modules/web-ext/lib/config.js][debug] Discovered config "/mnt/c/Users/Knuffle98/Code/Repos/Applicator/package.json" does not exist or is not readable
[/usr/local/lib/node_modules/web-ext/lib/config.js][debug] Discovered config "/mnt/c/Users/Knuffle98/Code/Repos/Applicator/web-ext-config.js" does not exist or is not readable
[/usr/local/lib/node_modules/web-ext/lib/cmd/run.js][info] Running web extension from /mnt/c/Users/Knuffle98/Code/Repos/Applicator
[/usr/local/lib/node_modules/web-ext/lib/util/manifest.js][debug] Validating manifest at /mnt/c/Users/Knuffle98/Code/Repos/Applicator/manifest.json
[/usr/local/lib/node_modules/web-ext/lib/extension-runners/firefox-desktop.js][debug] Creating new Firefox profile
[/usr/local/lib/node_modules/web-ext/lib/firefox/index.js][debug] Running Firefox with profile at /tmp/firefox-profilesTWUXQ/
[/usr/local/lib/node_modules/web-ext/lib/program.js][error]
Error: not found: C:\Program Files\Mozilla Firefox\firefox.exe
at F (/usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/which/which.js:63:19)
at E (/usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/which/which.js:72:29)
at /usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/which/which.js:81:16
at /usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/isexe/index.js:44:5
at /usr/local/lib/node_modules/web-ext/node_modules/fx-runner/node_modules/isexe/access.js:8:5
at FSReqCallback.oncomplete (node:fs:198:23)
What do you guys think is the problem?
For reference, it's a couple steps before this problem: Failed to sign Firefox WebExtensions with web-ext