Open yrral86 opened 2 months ago
I walked back versions. My project compiles okay on 2.9.0, but breaks on 2.10 - 2.12. 2.10 and 2.11 have a slightly different stack trace than 2.12:
🚨 Build failed.
@parcel/bundler-default: Got unexpected undefined
Error: Got unexpected undefined
at nullthrows
(node_modules/nullthrows/nullthrows.js:7:15)
at createIdealGraph
(node_modules/@parcel/bundler-default/lib/DefaultBundler.js:686:68)
at Object.bundle
(node_modules/@parcel/bundler-default/lib/DefaultBundler.js:123:19)
at BundlerRunner.bundle
(node_modules/@parcel/core/lib/requests/BundleGraphRequest.js:260:23)
at async Object.run
(node_modules/@parcel/core/lib/requests/BundleGraphRequest.js:128:17)
at async RequestTracker.runRequest
(node_modules/@parcel/core/lib/RequestTracker.js:637:20)
at async Object.run
(node_modules/@parcel/core/lib/requests/ParcelBuildRequest.js:51:7)
at async RequestTracker.runRequest
(node_modules/@parcel/core/lib/RequestTracker.js:637:20)
at async Parcel._build
(node_modules/@parcel/core/lib/Parcel.js:315:11)
at async Parcel.run
(node_modules/@parcel/core/lib/Parcel.js:206:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I also tried using getOwnPropertyNames on bundleRoots and the individual root variables, but both return empty arrays, so it doesn't seem to be an enumerable = false issue 🤷
🐛 bug report
I added some debugging logs before the for loop and found that when this executes both bundleRoots and assetToIndex are empty objects, but now I'm confused that it is entering the for loop at all with bundleRoots being empty.
If I also log
root
inside the loop, that also shows as an empty object.If I continue to rerun the build without clearing the cache, it eventually succeeds. When it does, none of the the debug logs are displaying
🎛 Configuration (.babelrc, package.json, cli command)
babel.config.json
🤔 Expected Behavior
The application should compile or at least provide a hint as to what went wrong.
😯 Current Behavior
The build crashes.
🔦 Context
We are using the following parcel modules
This setup works on our main branch, but we're maintaining a branch with significant changes to our typescript code and when we merged in a recent upgrade from 2.7.0 to 2.12.0, this broke.
💻 Code Sample
Code is unfortunately not sharable.
🌍 Your Environment