-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
CSS module composes triggers Got unexpected null
in ScopeHoistingPackager
#9071
Comments
A reproduction trimmed down from my codebase: $ echo 'export const c = "c"; export default "a";' > a.js
$ echo 'import { c } from "./a"; console.log(c);' > b.js
$ echo '<script type=module src='{a,b}'.js></script>' > index.html
$ yarn add parcel@2.8.3 && parcel build index.html
✨ Built in 722ms
$ yarn add parcel@2.9.2 && parcel build index.html
🚨 Build failed.
@parcel/packager-js: Got unexpected null
Error: Got unexpected null
at nullthrows (node_modules/nullthrows/nullthrows.js:7:15)
at node_modules/@parcel/packager-js/lib/ScopeHoistingPackager.js:813:51
at Array.every (<anonymous>)
at node_modules/@parcel/packager-js/lib/ScopeHoistingPackager.js:812:35
at Array.filter (<anonymous>)
at ScopeHoistingPackager.buildAssetPrelude
(node_modules/@parcel/packager-js/lib/ScopeHoistingPackager.js:802:60)
at ScopeHoistingPackager.buildAsset
(node_modules/@parcel/packager-js/lib/ScopeHoistingPackager.js:367:48)
at ScopeHoistingPackager.visitAsset
(node_modules/@parcel/packager-js/lib/ScopeHoistingPackager.js:322:17)
at processAsset (node_modules/@parcel/packager-js/lib/ScopeHoistingPackager.js:126:40)
at ScopeHoistingPackager.package
(node_modules/@parcel/packager-js/lib/ScopeHoistingPackager.js:140:9) |
I was having this same issue, but I solved it by running |
Thank you! It works for me too! |
I'm running into this issue as well, coming from the same line in |
Continues to happen in 2.12
|
🐛 bug report
CSS module with composes triggers
Got unexpected null
🤔 Expected Behavior
Works
😯 Current Behavior
💁 Possible Solution
Something about the JS generated for the CSS module has to trigger this?
🔦 Context
#9058
💻 Code Sample
src.zip
🌍 Your Environment
The text was updated successfully, but these errors were encountered: