parcel v2 - Error: Got unexpected undefined
See original GitHub issue๐ bug report
While testing out parcel v2 I ran into a fatal build error with an internal-looking failure.
๐ Configuration (.babelrc, package.json, cli command)
CLI
parcel watch ./src/ui/index.html
package.json
{
"targets": {
"browser": {"publicUrl": "/app"}
}
}
babelrc
module.exports = {
presets: ['@babel/preset-env'],
plugins: [['@babel/plugin-transform-react-jsx', {pragma: 'h'}]],
};
๐ค Expected Behavior
It builds the project or provides an error message as to what is wrong with my configuration.
๐ฏ Current Behavior
It fails with an internal undefined error message.
Error: Got unexpected undefined
at nullthrows (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/nullthrows/nullthrows.js:7:15)
at RequestGraph.removeById (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/Graph.js:188:40)
at RequestTracker.untrackRequest (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/RequestTracker.js:284:16)
at AssetGraphBuilder.handleNodeRemovedFromAssetGraph (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/AssetGraphBuilder.js:279:27)
at AssetGraph.onNodeRemoved (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/AssetGraphBuilder.js:107:35)
at AssetGraph.removeNode (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/AssetGraph.js:138:32)
at AssetGraph.removeEdge (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/Graph.js:215:12)
at AssetGraph.removeNode (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/Graph.js:179:14)
at AssetGraph.removeNode (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/AssetGraph.js:139:18)
at AssetGraph.removeEdge (/Users/patrick/Code/OpenSource/lighthouse-ci/node_modules/@parcel/core/lib/Graph.js:215:12)
๐ฆ Context
Trying to help test out parcel v2 ๐
๐ป Code Sample
https://github.com/GoogleChrome/lighthouse-ci/tree/parcelv2/packages/server
in repo root, run yarn
and then yarn build:watch
๐ Your Environment
Software | Version(s) |
---|---|
Parcel | 2.0.0-alpha.3.2 |
Node | v10.15.3 |
npm/Yarn | |
Operating System | macOS |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Newest 'parcel' Questions - Stack Overflow
I am using parcel V2.7.1 so that i can interact my frontend script with my ... Error: Key 216aea59fec25090 not found in cache/Error:...
Read more >@parcel/transformer-typescript-tsc - npm
Latest version: 2.8.2, last published: 10 days ago. Start using @parcel/transformer-typescript-tsc in your project by running `npm iย ...
Read more >Parcel
If you make an error in your code or configuration, Parcel displays beautiful diagnostics in your terminal and in the browser. Every error...
Read more >Parcel JS Setups Walkthrough and Review - YouTube
Parcel is a popular JavaScript bundling tool that can commonly be compared ... React JS Tutorial with Parcel JS Bundler ( v2 )....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For me, cleaning the cache fixed the issue. ๐
I think it was because of the cache, after clearing the cache it builds but now I get this error:
This experimental syntax requires enabling the parser plugin: 'classProperties'
.Related: https://github.com/parcel-bundler/parcel/issues/2668 , but the fix mentioned there doesnโt work.