-
-
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
Cannot read property 'run' of undefined #1319
Comments
Are you using any plugin? It seems like the worker init message doesn't get send for that worker. Would like to debug this but i'm afraid this will be system specific. Anyway a small repro repo would maybe be helpfull |
Am using this plugin actually: https://github.com/albinotonnina/parcel-plugin-inlinesvg Is there any way these error messages could be more helpful? I'm hesitant to spend time swapping out versions and re-trying when waiting for helpful error messages may just make it clear. |
Does it happen without the plugin? |
Ah well it doesn't say any file or plugin that it's breaking on, it seems like an internal error more than external, for example if it's with that plugin would be nice if it said the plugin name somewhere. Perhaps it's impossible in this area to do that? |
I guess it's possible not sure how though the workerfarm shouldn't be influenced by plugins, but apparently is, pretty strange. Let me know if removing the plugin fixes your issue |
getting same issue trying to deploy to pipelines:
|
@DesignAlchemy are you using any plugins? |
thats it |
@DesignAlchemy that's probably why it's failing, this line shouldn't be used inside a plugin, as it might cause unwanted side-effects and is considered a private module/file within parcel and is being updated without keeping in mind semantic versioning: const JSAsset = require('parcel-bundler/src/assets/JSAsset'); |
Thanks a lot, thats fixed the issue, fastest help iv ever had on here ! Should i raise a bug with that repo or is this a core fix ? Thanks |
@DesignAlchemy probably a good idea, the plugin should be extending Asset instead of JSAsset. (although I'm not sure if that would be possible in the eslint case) @natew This bug should be fixed in the latest svg plugin, is this fixed? Than I can close this issue. |
@DeMoorJasper I don't see a new version of the svg plugin in the last month I'm on latest. Removing the plugin actually still breaks the same way. I have a custom babel-config using the following plugins: babel-plugin-transform-decorators-legacy-without-clutter as well as two custom one's we've built, so not sure how to debug that. Edit: removing babel-plugin-macros fixed this. |
I've tried looking into this today and wasn't able to reproduce any of these issues. |
Yea I'll have to wait for a big window because the app itself is big with many dependencies, including custom babel configs and features within it that rely on that. Which means some pretty intense manual binary searching. No chance there's some way to spit out an error that's closer to whats actually going on? Debugging |
Added a log before the error: And I see this:
I did swap out a few transforms so they are mostly standard now. Just one custom jsx one. Will keep poking around. |
Logging out the data, and it seems to start with a font file:
|
Yep that seems to be it, if I remove the import it goes away. The fonts are loaded via a css file like so:
Would be super helpful to log out the filename on this error in particular. Now I run into another issue which I can check out separately. |
After seeing your logs this is definitely the cause
Not sure what causes it though, I'll look into it if I have some time |
Yea though still no idea what that is or what’s causing it. I did find the
cause by logging out data. I’ll submit a PR with better error message.
Any idea why an eot font file would cause that in 1.8 but not 1.6?
|
I have no clue, it should work perfectly. A font should definitely not cause a worker bug. If it would cause an error inside asset parsing it would make more sense. But that's not the case |
This hack (from #637) fixed it for me 😮
|
I get the same error when running watch with:
If I Ctrl + C the process and then run it again, the problem goes away. Sometimes I then edit an unrelated components, and it comes back. Makes it quite hard to develop. |
Could you check if this still happens when using #1587 ? |
I have been able to consistently reproduce this when running parcels master branch through node 6, #1587 should fix this |
Hi, I have a similar problem as natew, even with #1587. I'm using a plugin to import the content of text files as raw strings (which is quasi TextAsset.js from When using it, other assets (e.g. React.js) are overridden with the content of one of the imported text files. It looks like they are getting the same ID as other assets. Arbitrarily changing the ID for the text assets (e.g. Strangely, it only happens when the assets are imported from a file in a subfolder, so importing |
@maxbeier Could you create a reproducable example? |
I tried to but now it's gone. It was the same as in parcel-plugin-svelte#20. It seems that removing |
🐛 bug report
🤔 Expected Behavior
This is on a small site I have working with 1.6.2, but 1.8.x seems to break. Mostly just would be helpful if there was more clear error messaging here so I could debug without binary searching.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: