-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parcel serve: Got unexpected null #6043
Comments
It just happened again
|
Can't reproduce with a simple script, so it seems to only happen when using certain features. It also happens in 2.0.0-nightly.629+39ff8330 |
That code was recently changed, can you provide a complete code sample? |
Btw, my .parcelrc:
|
It's kind of hard because my work isn't open source and it doesn't happen with everything. But I'll try to hack something together in hopes of triggering it :) |
No luck in triggering it outside of my environment so far, but I printed the thing which doesn't have a filePath to console and it looks like this and seems to have something to do with css compression:
I have done this in node_modules/@parcel/core/lib/public/Bundle.js
|
Put this into styling.css:
and this into main.ts
I got that to crash once but after that never again. Maybe it crashes for you too the first time which would satisfy being a reproduction :) |
I just got this error as well, looks like it was caused by an inline CSS bundle that was created because of Inline bundles do indeed not have a filepath ... |
Great that you could reproduce! But I'm only using bundle-text and still get the error. Maybe the filePath is lost somewhere during processing? |
It's intentional that inline bundles don't have a file path, as they are never written to disk directly (and namer plugins aren't invoked for them). So the fix would be adding
|
We are seeing that issue too I believe:
|
I got this error when I had accidentally overwritten my import with parcel output, which made it no longer a module. |
In my case, I had to delete .parcel-cache folder, after that it worked without any issues. |
me too. after deleting cache folder, all gose well |
thanks for your help on this, deleting the .parcel-cache folder cleared any issues for me as well |
thank you so much for help, I am trying to fix this from yesterday now it also worked for me after deleting .parcel-cache |
Deleting the parcel-cache will work |
thanks a lot . it worked for me after deleting parcel-cache |
I have getting this error how can I solve this error please help 🙏🏿
Error: Got unexpected null |
I have getting this error how can I solve this error please give me the solution Error: Got unexpected undefined |
🐛 bug report
I've been getting this error when running
parcel serve
a couple times todayI've tried cleaning the cache and it didn't help. It happens after like the 2nd or 3rd request.
Unfortunately when I tried to actively reproduce it it stopped and has been working since :( I'll update with more info if it happens again.
I have a new laptop so maybe something's not set up correctly.
🎛 Configuration (.babelrc, package.json, cli command)
package.json
.babelrc:
🤔 Expected Behavior
Parcel serve should not crash.
😯 Current Behavior
It crashes sometimes.
💁 Possible Solution
Never crash.
🔦 Context
Wanted to continue developing my script and wondered why nothing happened.
💻 Code Sample
I'll post one if I manage to reproduce it with something that's not my whole code
🌍 Your Environment
The text was updated successfully, but these errors were encountered: