parcel: v2: "Got unexpected null" when building TypeScript project

πŸ› 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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (13 by maintainers)

Commits related to this issue

Most upvoted comments

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

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