webcompat / webcompat-reporter-extensions

Browser extensions to help report site compatibilty issues.
26 stars 21 forks source link

npm run firefox not working as expected #101

Open OrionStar25 opened 6 years ago

OrionStar25 commented 6 years ago

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

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

miketaylr commented 6 years ago

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 commented 6 years ago

Im using Firefox quantum as of now.

miketaylr commented 6 years ago

@OrionStar25 ah, OK. :)

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

OrionStar25 commented 6 years ago

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

miketaylr commented 6 years ago

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

deeptibaghel commented 6 years ago

Looks like it is a bug reported at web-ext also: https://github.com/mozilla/web-ext/issues/1083

miketaylr commented 6 years ago

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

laghee commented 6 years ago

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

> webcompat-reporter-addon@0.5.1 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! webcompat-reporter-addon@0.5.1 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 webcompat-reporter-addon@0.5.1 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...