wallabyjs / quokka

Repository for Quokka.js questions and issues
https://quokkajs.com
1.17k stars 31 forks source link

Cannot find module #910

Closed Navy-gif closed 10 months ago

Navy-gif commented 10 months ago

Issue description or question

Documentation mentions I should be able to run this with TypeScript without requiring any config, however, as soon as I try running it I get a "cannot find module" error in the Quokka output.

The sample repository contains the tsconfig file I use in my projects, if it contains an incompatible configuration, please document it.

Is this issue related to Quokka not outputting the expected results of your code?: Yes/No No, quokka fails to run at all

Sample repository link

https://github.com/Navy-gif/quokka-issue

Quokka.js Console Output

​​​​​Quokka PRO 'index.ts' (node: v20.8.0, TypeScript: v5.2.2)​​​​   Cannot find module '.\test.js' imported from .\index.js 

Code editor version

Visual Studio Code v1.84.2

OS name and version

Windows 10 22H2

ArtemGovorov commented 10 months ago

While we haven't been able to reproduce the cannot find module error in the https://github.com/Navy-gif/quokka-issue repo, we have reproduced another error that may be causing the issue for you.

The found issue was fixed and the fix is published in v1.0.583.

Navy-gif commented 10 months ago

Unfortunately this seems to not have fixed it for me. Are there any other environmental factors that could lead to the exhibited behaviour?

ArtemGovorov commented 10 months ago

Are there any other environmental factors that could lead to the exhibited behaviour?

Likely so. Can you please run the latest version of Quokka on your sample repo https://github.com/Navy-gif/quokka-issue and share a screenshot of the error that you are getting?

Navy-gif commented 10 months ago

Code_2023-11-21_15-07-22

And just to confirm that it runs fine in node Code_2023-11-21_15-38-12

mburnell commented 10 months ago

Thank you for the additional detail. We were able to reproduce the issue, and we think we've identified the cause. We've released Quokka version 1.0.586, which contains a fix we hope will address your issue. Please update to this version and let us know how you go.

Navy-gif commented 10 months ago

It seems to have fixed my issue, thank you.