Skip to content

Breaks under yarn >=3.0.0 #2332

Closed
Closed
@leaumar

Description

@leaumar

Is this a feature request or a bug?

Bug: crashes with a runtime error under a recent update of a popular package manager.

What is the current behavior?

This commit broke web-ext in my 6 addon projects. Updating yarn from 2.x to 3.0.0 and later causes the following error whenever invoking web-ext in any way (build, lint, run):

PS D:\Projects\copy-selected-links> yarn start
➤ YN0000: executing [start]: web-ext run
(node:7852) UnhandledPromiseRejectionWarning: TypeError: (0 , g.Parser) is not a function
    at R.cleanupProcessEnvConfigs (D:\Projects\copy-selected-links\.yarn\cache\web-ext-npm-6.5.0-1111bd61bd-fca1741464.zip\node_modules\web-ext\dist\web-ext.js:1:62943)
    at R.execute (D:\Projects\copy-selected-links\.yarn\cache\web-ext-npm-6.5.0-1111bd61bd-fca1741464.zip\node_modules\web-ext\dist\web-ext.js:1:63533)
    at Object.main (D:\Projects\copy-selected-links\.yarn\cache\web-ext-npm-6.5.0-1111bd61bd-fca1741464.zip\node_modules\web-ext\dist\web-ext.js:1:72644)
    at Object.<anonymous> (D:\Projects\copy-selected-links\.yarn\cache\web-ext-npm-6.5.0-1111bd61bd-fca1741464.zip\node_modules\web-ext\bin\web-ext:7:8)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.external_module_.Module._load (D:\Projects\copy-selected-links\.pnp.cjs:24162:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47

Rverting back to 2.4.3 solves the error.

Sole exception to this is yarn web-ext --version, which just works.

The folks over at yarn are adamant that issues like this are not on their table. 😕 I hope it will be received better here.

What is the expected or desired behavior?

Web-ext commands like run don't instantly fail with an error.

Version information (for bug reports)

  • Firefox version: n/a
  • Your OS and version: Win10
  • Paste the output of these commands:
node --version && npm --version && web-ext --version

14.18.1
6.14.15
6.4.0

Thanks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions