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

[🐞] V2 migration tool should also update "moduleResolution" to "Bundler" in tsconfig.json #7130

Closed
jakovljevic-mladen opened this issue Dec 4, 2024 · 4 comments · Fixed by #7139
Assignees
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@jakovljevic-mladen
Copy link
Contributor

Which component is affected?

Qwik Rollup / Vite plugin

Describe the bug

I installed qwik application in version 1.2.10 when the default "moduleResolution" in tsconfig.json value was set to "node". After migrating to V2 alpha, this does not work producing an error on any line that has import ... from '@qwik.dev/core'; where an error says:

TS2307: Cannot find module @qwik.dev/ core or its corresponding type declarations.
There are types at
.../node_modules/@qwik.dev/core/public.d.ts
, but this result could not be resolved under your current moduleResolution setting. Consider updating to node16, nodenext, or bundler

Updating moduleResolution value to Bundler fixes the problem, so I believe V2 migration tool should consider updating moduleResolution field to Bundler among other things it does.

Reproduction

https://qwik.new/

Steps to reproduce

Not really sure, but this should be correct:

  • Install Qwik version 1.2.10.
  • Update to Qwik 1.11.0 manually (make sure moduleResolution is set to node in tsconfig.json.
  • Run qwik migrate-v2.
  • Open any file that has something like this: import ... from '@qwik.dev/core';.
  • Error is present below '@qwik.dev/core'.

System Info

V2

Additional Information

No response

@jakovljevic-mladen jakovljevic-mladen added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Dec 4, 2024
@wmertens
Copy link
Member

wmertens commented Dec 4, 2024

Hmm, I think it's not safe to just change it, but maybe it could just ask for it @dmitry-stepanenko ?

In any case that's a bug in how we package qwik, it should still work with node resolution :(

@jakovljevic-mladen
Copy link
Contributor Author

In any case that's a bug in how we package qwik, it should still work with node resolution :(

Shall I update the ticket then?

@shairez shairez moved this from Backlog to Upcoming in Qwik Development Dec 4, 2024
@shairez
Copy link
Contributor

shairez commented Dec 4, 2024

Thanks @jakovljevic-mladen !

@dmitry-stepanenko mind taking a qwik look? :)
Thanks! 🙏

@shairez
Copy link
Contributor

shairez commented Dec 13, 2024

fixed the root bug in #7159

@dmitry-stepanenko I'll comment out the "bundler' logic for now (just in case, until we'll gather more feedback if this can be turned on)
But now that the root cause is fixed, it should "just work"™ 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants