-
Notifications
You must be signed in to change notification settings - Fork 31
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
Failed to create worker instance
#696
Comments
I added Also found that an undocumented What does I would prefer to use my own Now I get this:
I use this in my
My
EDIT: Seems unsupported in Setting |
Your original error,
For the purpose of supporting wider range of nodejs versions by default Quokka uses ECMAScript module loader. If you are using nodejs 12 or higher, then you may change your Quokka config to switch to native ECMAScript modules with: {
...
"stdEsm": false,
"nativeEsm": true
}
We don't currently support this. If you're using native esm, Quokka actually creates and uses its own loader.
From our docs: If you want to use Babel to compile TypeScript files then an additional configuration option, {
"babel": {
"ts": true,
"plugins": ["@babel/plugin-transform-typescript"]
}
} |
Does Quokka actually need to use its own loader to enable any Quokka functionality? Would it be difficult to support disabling this? I want to use the same |
Quokka needs the loader in order to be able to re-use the sample node.js process (this is what makes it fast). We don't have any plans to support custom experimental loaders with Quokka at this point in time, and it's not a trivial change for us. We are happy to add a feature request for supporting |
It was quite complex to get it working with Wallaby so a lot of stuff related to that. I prefer to be able to add my own hook so I can write better error messages when something goes wrong, and can debug/log module resolution. Quokka plugins are used often to modify module loading, so this is just the same functionality for native ESM.
Doesn't Even when running |
Yeah, I had figured that adding swc support wouldn't work for you.
Quokka integrates with |
For SWC support, this might help: https://typestrong.org/ts-node/docs/transpilers#bundled-swc-integration |
Also, does this work: https://quokkajs.com/docs/configuration.html#compiler-settings It had not effect for me. |
Thanks!
The TypeScript compiler setting is only applicable if you are using the TypeScript compiler. If you are using babel (which I assume that you're using) then you will need to perform similar configuration with babel config. From the babel docs:
|
Even with Ideally I don't want anything babel in my codebase anymore. My blocker right now is |
Could you please provide your exact configuration? It works for us but perhaps there is something wrong with your config. |
https://github.com/vjpr/issue-quokka-ts/tree/main I think the issue is that it's not overriding options from the |
It looks like the problem is with TypeScript initially parsing the I get the same error trying to compile your project from the CLI with TypeScript 4.5.0 beta:
|
Interesting. TS docs are wrong then...or maybe it's coming in new beta. https://www.typescriptlang.org/tsconfig#moduleResolution Or maybe 'module' needs to be set to 'nodenext'. Docs are a bit confusing. UPDATE: Yep, if you install |
Issue description or question
How can I debug this? Can I see the logs somewhere?
Code editor version
IntelliJ IDEA 2021.2.3 (Ultimate Edition)
OS name and version
OSX
The text was updated successfully, but these errors were encountered: