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.

v2: "Got unexpected null" when building TypeScript project

See original GitHub issue

🐛 bug report

When trying to upgrade my project to Parcel V2, I got the error message:

$ D:\Development\NITRO_BMD\node_modules\.bin\parcel build src/index.html
× Got unexpected null
    at nullthrows (D:\Development\NITRO_BMD\node_modules\nullthrows\nullthrows.js:7:15)
    at BundleGraph.resolveSymbol (D:\Development\NITRO_BMD\node_modules\@parcel\core\lib\BundleGraph.js:368:53)
    at BundleGraph.resolveSymbol (D:\Development\NITRO_BMD\node_modules\@parcel\core\lib\public\BundleGraph.js:116:51)
    at markUsed (D:\Development\NITRO_BMD\node_modules\@parcel\scope-hoisting\lib\concat.js:201:32)
    at enter (D:\Development\NITRO_BMD\node_modules\@parcel\core\lib\Graph.js:475:16)
    at enter (D:\Development\NITRO_BMD\node_modules\@parcel\core\lib\Graph.js:475:16)
    at enter (D:\Development\NITRO_BMD\node_modules\@parcel\core\lib\Graph.js:475:16)
    at walk (D:\Development\NITRO_BMD\node_modules\@parcel\core\lib\Graph.js:331:22)
⠹ Optimizing index.19203168.css...
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

🎛 Configuration (.babelrc, package.json, cli command)

The project is available here: https://github.com/magcius/noclip.website/tree/parcel-v2

🌍 Your Environment

Software Version(s)
Parcel 2.0.0-alpha.2.1
Node v10.16.3
npm/Yarn Yarn version 1.19.0
Operating System Windows 10

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
Richicratoscommented, Apr 22, 2021

I deleted the .parcel-cache folder and it works!

1reaction
LukasBombachcommented, Nov 12, 2021

You will also get this error in an isolated module, ie one that does neither import nor export anything

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9 project suddenly throws compilation errors when ...
Come today, with no changes, I can no longer compile the app due to typescript 3.7.2 features although i'm running on 3.7.3 globally...
Read more >
TypeScript: Documentation - The Basics
If we break this down, the first runnable line of code accesses a property called toLowerCase and then calls it. The second one...
Read more >
rollup/plugin-typescript
Start using @rollup/plugin-typescript in your project by running `npm i ... requires an LTS Node version (v14.0.0+) and Rollup v2.14.0+.
Read more >
Troubleshooting common AWS CDK issues
When deploying my AWS CDK stack, I receive a forbidden: null message ... If you are using TypeScript or JavaScript, your project directory...
Read more >
TypeScript support in Svelte - Learn web development
Creating a Svelte TypeScript project from scratch ... about the kind of assistance we can get from TypeScript when building Svelte projects.
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