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

Resolve 1.11.1 causes build breaks #3589

Closed
mikeharder opened this issue Jun 7, 2019 · 2 comments · Fixed by #4072
Closed

Resolve 1.11.1 causes build breaks #3589

mikeharder opened this issue Jun 7, 2019 · 2 comments · Fixed by #4072
Assignees
Labels
EngSys This issue is impacting the engineering system.

Comments

@mikeharder
Copy link
Member

mikeharder commented Jun 7, 2019

A breaking change was added to the resolve package between versions 1.11.0 to 1.11.1, which causes package rollup-plugin-node-resolve to fail bundling the buffer dependency.

As a workaround, the package was pinned to version 1.11.0. We believe the correct long-term fix is rollup/rollup-plugin-node-resolve#222, and we may attempt to create a PR fixing that issue.

A second issue is that resolve@1.11.1 broke rollup-plugin-commonjs in a similar way (rollup/rollup-plugin-commonjs#394). The fix/workaround is to append a trailing slash to the named exports of modules with built-in names.

Related PRs

@mikeharder mikeharder added the EngSys This issue is impacting the engineering system. label Jun 7, 2019
@mikeharder mikeharder self-assigned this Jun 7, 2019
@bterlson
Copy link
Member

Put up a PR fixing this issue (I think) in rollup-plugin-node-resolve here.

@mikeharder
Copy link
Member Author

When using resolve@1.11.1 and rollup-plugin-node-resolve@5.1.0 (latest versions of both), the issues with could not load <dependency> are fixed. However, the builds of storage-blob and storage-file are still broken due to another error:

ist-esm/src/index.browser.js ? browser/azure-storage-blob.js...
[!] Error: 'EventEmitter' is not exported by node_modules\events\events.js
https://rollupjs.org/guide/en#error-name-is-not-exported-by-module-
dist-esm\src\utils\Batch.js (4:9)
2: // In browser, during webpack or browserify bundling, this module will be replaced by 'events'
3: // https://github.com/Gozala/events
4: import { EventEmitter } from "events";
            ^
5: /**
6:  * States for Batch.
Error: 'EventEmitter' is not exported by node_modules\events\events.js
    at error (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:9234:30)
    at Module.error (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:13064:9)
    at handleMissingExport (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:12987:21)
    at Module.traceVariable (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:13364:17)
    at ModuleScope.findVariable (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:12111:39)
    at FunctionScope.findVariable (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:2890:38)
    at ChildScope.findVariable (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:2890:38)
    at FunctionScope.findVariable (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:2890:38)
    at ChildScope.findVariable (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:2890:38)
    at Identifier$1.bind (common\temp\node_modules\.registry.npmjs.org\rollup\1.13.1\node_modules\rollup\dist\rollup.js:8407:40)

mikeharder added a commit that referenced this issue Jun 25, 2019
- Repo has been updated to "rollup-plugin-node-resolve@5.0.2", which is compatible with "resolve@1.11.1"
- Added trailing slash to named exports of modules with built-in names
  - Required when using  "rollup-plugin-commonjs@10.0.0" with "resolve@1.11.1"
  - rollup/rollup-plugin-commonjs#394
- Fixes #3589
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
EngSys This issue is impacting the engineering system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants