parcel
parcel copied to clipboard
`Error: Expected content key 0788422aa91f880f to exist` when renaming `.tsx` -> `.ts`
🐛 bug report
parcel serve
crashes when renaming a file from .ts to .tsx to .ts
✨ Built in 154ms
Error: Expected content key 0788422aa91f880f to exist
at nullthrows (/private/tmp/parcel-weird-transformations/node_modules/nullthrows/nullthrows.js:7:15)
at ContentGraph.getNodeIdByContentKey (/private/tmp/parcel-weird-transformations/node_modules/@parcel/core/lib/ContentGraph.js:90:38)
at BundleGraph.getDependencies (/private/tmp/parcel-weird-transformations/node_modules/@parcel/core/lib/BundleGraph.js:588:30)
at BundleGraph.getDependencies (/private/tmp/parcel-weird-transformations/node_modules/@parcel/core/lib/public/BundleGraph.js:198:48)
at /private/tmp/parcel-weird-transformations/node_modules/@parcel/reporter-dev-server/lib/HMRServer.js:108:46
at /private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:55:30
at PromiseQueue._runFn (/private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:108:13)
at PromiseQueue._next (/private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:95:16)
at PromiseQueue.run (/private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:86:12)
at HMRServer.emitUpdate (/private/tmp/parcel-weird-transformations/node_modules/@parcel/reporter-dev-server/lib/HMRServer.js:135:30) {
framesToPop: 1
}
Error: Expected content key 0788422aa91f880f to exist
at nullthrows (/private/tmp/parcel-weird-transformations/node_modules/nullthrows/nullthrows.js:7:15)
at ContentGraph.getNodeIdByContentKey (/private/tmp/parcel-weird-transformations/node_modules/@parcel/core/lib/ContentGraph.js:90:38)
at BundleGraph.getDependencies (/private/tmp/parcel-weird-transformations/node_modules/@parcel/core/lib/BundleGraph.js:588:30)
at BundleGraph.getDependencies (/private/tmp/parcel-weird-transformations/node_modules/@parcel/core/lib/public/BundleGraph.js:198:48)
at /private/tmp/parcel-weird-transformations/node_modules/@parcel/reporter-dev-server/lib/HMRServer.js:108:46
at /private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:55:30
at PromiseQueue._runFn (/private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:108:13)
at PromiseQueue._next (/private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:95:16)
at PromiseQueue.run (/private/tmp/parcel-weird-transformations/node_modules/@parcel/utils/lib/PromiseQueue.js:86:12)
at HMRServer.emitUpdate (/private/tmp/parcel-weird-transformations/node_modules/@parcel/reporter-dev-server/lib/HMRServer.js:135:30) {
framesToPop: 1
}
error Command failed with exit code 1.
🎛 Configuration (.babelrc, package.json, cli command)
Please see attached .zip
🤔 Expected Behavior
No crash
😯 Current Behavior
Crash
💁 Possible Solution
Fix crash
🔦 Context
Was renaming a file because I wanted to use jsx in it but then I chickened out.
💻 Code Sample
Download this: parcel-rename-crash.zip
- Unzip
-
yarn install
-
yarn serve
- In other terminal window:
cd src
-
mv stuff.ts stuff.tsx
-
mv stuff.tsx stuff.ts
- Switch back to other terminal window and observe that parcel has crashed
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.0.0-nightly.746+d1e0a1a0 |
Node | v16.4.0 |
npm/Yarn | yarn 1.22.10 |
Operating System | macOS 10.15.7 (19H1217) |