Skip to content
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

The plugin is not compatible with Parcel 1.7.1 #36

Closed
item4 opened this issue Apr 20, 2018 · 3 comments
Closed

The plugin is not compatible with Parcel 1.7.1 #36

item4 opened this issue Apr 20, 2018 · 3 comments

Comments

@item4
Copy link

item4 commented Apr 20, 2018

Deps

parcel-bundler@1.7.1
typescript@2.8.3

Error

/Users/item4/Projects/item4.github.io/node_modules/parcel-bundler/src/workerfarm/Worker.js:114
        throw new Error(
        ^

Error: Worker Farm: Received message for unknown index for existing child. This should not happen!
    at Worker.receive (/Users/item4/Projects/item4.github.io/node_modules/parcel-bundler/src/workerfarm/Worker.js:114:15)
    at ChildProcess.emit (events.js:180:13)
    at emit (internal/child_process.js:783:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
error Command failed with exit code 1.

Temporary fix solution

remove parcel-plugin-typescript

reproduce codebase

https://github.com/item4/item4.github.io

(sorry, I can not make simple case)

@fathyb fathyb changed the title Worker Farm error when using this plugin The plugin is not compatible with Parcel 1.7.1 Apr 20, 2018
@jaredpetker
Copy link

jaredpetker commented May 5, 2018

This manifests itself differently with 1.8.1 with this error

  Cannot read property 'run' of undefined
    at /Users/jaredpetker/dev/cc/confidentwholesale/frontend/node_modules/parcel-bundler/lib/workerfarm/child.js:70:45
    at Generator.next (<anonymous>)
    at step (/Users/jaredpetker/dev/cc/confidentwholesale/frontend/node_modules/parcel-bundler/lib/workerfarm/child.js:3:191)
    at /Users/jaredpetker/dev/cc/confidentwholesale/frontend/node_modules/parcel-bundler/lib/workerfarm/child.js:3:437
    at new Promise (<anonymous>)
    at /Users/jaredpetker/dev/cc/confidentwholesale/frontend/node_modules/parcel-bundler/lib/workerfarm/child.js:3:99
    at Child.handleRequest (/Users/jaredpetker/dev/cc/confidentwholesale/frontend/node_modules/parcel-bundler/lib/workerfarm/child.js:77:7)
    at Child.messageListener (/Users/jaredpetker/dev/cc/confidentwholesale/frontend/node_modules/parcel-bundler/lib/workerfarm/child.js:38:19)
    at emitTwo (events.js:130:20)
    at process.emit (events.js:213:7)

Which makes it unusable and I'm forced to use an older version of parcel since I use the pathmappings liberally everywhere. @fathyb do you have anything to point to if you don't have the time to look into this so maybe I could?

@fathyb fathyb closed this as completed in 39a7a51 May 5, 2018
@fathyb
Copy link
Owner

fathyb commented May 5, 2018

The bug was due to a weird side-effect in the new Parcel WorkerFarm, the error message misled me into thinking it was due to the plugin's IPC. Other plugins may be affected.

I released a (way too) simple fix for Parcel 1.8 in parcel-plugin-typescript@0.7.1. I'm not 100% confident though, let me know if you encounter any similar issue!

@jaredpetker
Copy link

Heyo seems to be working so far, thanks man, super appreciated 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants