Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run firefox not working as expected #101

Open
OrionStar25 opened this issue Mar 2, 2018 · 8 comments
Open

npm run firefox not working as expected #101

OrionStar25 opened this issue Mar 2, 2018 · 8 comments

Comments

@OrionStar25
Copy link
Contributor

screenshot from 2018-03-03 03-07-48

Tests are working all fine, and the build for each browser works too.

@miketaylr
Copy link
Member

Interesting, thanks @OrionStar25!

It seems like it's not able to find the Firefox binary (guessing from that error coming form which.js. Do you have Firefox installed on your machine?

@OrionStar25
Copy link
Contributor Author

OrionStar25 commented Mar 2, 2018

Im using Firefox quantum as of now.

@miketaylr
Copy link
Member

@OrionStar25 ah, OK. :)

(I just assumed, b/c I couldn't see it in the sidebar from the screenshot).

@OrionStar25
Copy link
Contributor Author

That would be the question mark xD, for some reason, the logo fails to stay after the initial milisecond. :/

@miketaylr
Copy link
Member

For future investigation, it seems like the fx-runner module is failing to find the binary: mozilla/node-fx-runner#7 seems related.

@deeptibaghel
Copy link
Contributor

Looks like it is a bug reported at web-ext also: mozilla/web-ext#1083

@miketaylr
Copy link
Member

Thanks! (I'm going to delete your previous commments just so we keep this issue less cluttered.)

@laghee
Copy link
Contributor

laghee commented Jul 14, 2018

Extra logging with verbose flag on web-ext (installed as dev dependency):

~/Dropbox/Coding/Mozilla/webcompat-reporter-extensions[kmanning](issues/131/1) 🖖🏻 npm run firefox -- -f beta -p webcompat -v

> [email protected] firefox /Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions
> web-ext run --source-dir=dist/firefox "-f" "beta" "-p" "webcompat" "-v"

[program.js][info] Version: 2.7.0
[program.js][debug] Getting the version from package.json
[program.js][debug] Discovering config files. Set --no-config-discovery to disable
[config.js][debug] Discovered config "/Users/kmanning/.web-ext-config.js" does not exist or is not readable
[config.js][debug] Discovered config "/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/web-ext-config.js" does not exist or is not readable
[program.js][info] Applying config file: ./package.json
[config.js][debug] Loading JS config file: "/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/package.json" (resolved to "/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/package.json")
[config.js][debug] Looking for webExt key inside package.json file
[config.js][debug] Config file /Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/package.json did not define any options. Did you set module.exports = {...}?
[program.js][error] 
Error: Cannot find module 'colors'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/node_modules/web-ext/dist/webpack:/external "colors":1:1)
    at __webpack_require__ (/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/node_modules/web-ext/dist/webpack:/webpack/bootstrap 53a217b667dd1e5cd9de:19:1)
    at Object.<anonymous> (/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/node_modules/web-ext/dist/webpack:/node_modules/@cliqz-oss/firefox-client/lib/client.js:5:1)
    at __webpack_require__ (/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/node_modules/web-ext/dist/webpack:/webpack/bootstrap 53a217b667dd1e5cd9de:19:1)
    at Object.<anonymous> (/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/node_modules/web-ext/dist/webpack:/node_modules/@cliqz-oss/firefox-client/lib/browser.js:3:1)
    at __webpack_require__ (/Users/kmanning/Dropbox/Coding/Mozilla/webcompat-reporter-extensions/node_modules/web-ext/dist/webpack:/webpack/bootstrap 53a217b667dd1e5cd9de:19:1)

[program.js][error] Error code: MODULE_NOT_FOUND

[program.js][debug] Command executed: run
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] firefox: `web-ext run --source-dir=dist/firefox "-f" "beta" "-p" "webcompat" "-v"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] firefox script.

Looks like it's throwing an error because it doesn't find config info in package.json, which maybe means they made it required rather than optional in one of these merges? But that doesn't explain why it works (or seems to) with a global or source-linked install of web-ext...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants