-
Notifications
You must be signed in to change notification settings - Fork 346
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
'run' command fails due to absent 'es6-promise' #1629
Labels
Comments
Also encountering this issue. Reverting to 2.4.0 release fixes it. |
1 task
rpl
added a commit
to rpl/sign-addon
that referenced
this issue
Nov 28, 2019
By using `import fs from "mz/fs"` instead of `import {fs} from "mz"`, the resulting webpack bundle contains require calls for modules that are not direct dependencies of the sign-addon package, but dependencies of the mz package. This small difference may trigger issues like: mozilla/web-ext#1629 Which is now covered against regressions by a "smoke test" running on the web-ext CI jobs (the smoke test triggers this kind of unexpected issue by running all the functional tests on an environment created using `npm install --production --legacy-bundling`, which generates a non deduplicated node_modules directory tree). Before this change: npx js-beautify dist/sign-addon.js | grep require\(\" npx: installed 29 in 1.819s require("source-map-support").install(), module.exports = function(e) { e.exports = require("common-tags") e.exports = require("fs") e.exports = require("path") e.exports = require("url") e.exports = require("deepcopy") e.exports = require("jsonwebtoken") e.exports = require("request") e.exports = require("any-promise") e.exports = require("graceful-fs") e.exports = require("thenify-all") and then after it: require("source-map-support").install(), module.exports = function(e) { e.exports = require("common-tags") e.exports = require("fs") e.exports = require("path") e.exports = require("mz") e.exports = require("url") e.exports = require("deepcopy") e.exports = require("jsonwebtoken") e.exports = require("request")
willdurand
pushed a commit
to mozilla/sign-addon
that referenced
this issue
Nov 29, 2019
By using `import fs from "mz/fs"` instead of `import {fs} from "mz"`, the resulting webpack bundle contains require calls for modules that are not direct dependencies of the sign-addon package, but dependencies of the mz package. This small difference may trigger issues like: mozilla/web-ext#1629 Which is now covered against regressions by a "smoke test" running on the web-ext CI jobs (the smoke test triggers this kind of unexpected issue by running all the functional tests on an environment created using `npm install --production --legacy-bundling`, which generates a non deduplicated node_modules directory tree). Before this change: npx js-beautify dist/sign-addon.js | grep require\(\" npx: installed 29 in 1.819s require("source-map-support").install(), module.exports = function(e) { e.exports = require("common-tags") e.exports = require("fs") e.exports = require("path") e.exports = require("url") e.exports = require("deepcopy") e.exports = require("jsonwebtoken") e.exports = require("request") e.exports = require("any-promise") e.exports = require("graceful-fs") e.exports = require("thenify-all") and then after it: require("source-map-support").install(), module.exports = function(e) { e.exports = require("common-tags") e.exports = require("fs") e.exports = require("path") e.exports = require("mz") e.exports = require("url") e.exports = require("deepcopy") e.exports = require("jsonwebtoken") e.exports = require("request")
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a feature request or a bug?
bug
What is the current behavior?
web-ext … run
directly fails with an error:Error: Cannot find module 'es6-promise'
.The error appears related to one of web-ext’s dependencies,
@cliqz-oss/node-firefox-connect
. That dependency does however neatly install es6-promise as its dependency, so I have no idea why it is not found there. Perhaps the problem is somehow in the module resolver (or is it node or webpack doing the resolving here?).The problem could perhaps disappear by cleaning up some of the forked dependencies; supposedly es6-promise is not even necessary anymore for the node-firefox-connect module. But it would be nice to figure out the source of the problem.
It is common to not encounter this error because npm often 'lifts' the es6-promise module for deduplication, with the side-effect that it will no longer fail to find it. Hence to reliably reproduce this error, install web-ext without dependency deduplication using
--legacy-bundling
. For example:Relevant console output:
Version information (for bug reports)
Firefox: 67
OS: Ubuntu
node: v8.16.0
npm: 6.9.0
web-ext: 3.0.0 (and earlier versions, since 2.5.0, which introduces the @cliqz-oss/node-firefox-connect dependency)
The text was updated successfully, but these errors were encountered: