question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jayantbhcommented, May 5, 2021

For me, cleaning the cache fixed the issue. ๐Ÿ˜…

2reactions
Cristy94commented, Mar 20, 2020

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.

Read more comments on GitHub >

github_iconTop 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-bundler | Yarn - Package Manager
Fast, reliable, and secure dependency management.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found