-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
app-vite v2 rc2 - '#q-app' alias is not recognized in yarn/bun monorepo #17648
Comments
So, please provide a detailed and reproducible reproduction. Which package manager you are using? Can you also share your directory structure, any monorepo-related configuration(e.g. |
I think I get what you mean here, |
Yes, exactly. I'm using bun as package manager. |
I've found a solution, but I will test it further tomorrow morning. |
…ces (fix: quasarframework#17648) it also improves handling for any other aliases to npm packages
Thanks for reporting! The fix will be available in app-vite v2 rc.3 and app-webpack v4 rc.3 |
Windows: Upgraded to app-vite v2 rc.3 (from rc.2) and the issue still exists.
Then:
But '#q-app/wrappers' is still unrecognised. |
npm: '#q-app/wrappers' still not recognized @yusufkandemir |
Please share a reproduction. |
Make sure you remove "extends": "./.quasar/tsconfig.json",
- "compilerOptions": {
- "baseUrl": "."
- } This what tsconfig.json should look like: {
"extends": "./.quasar/tsconfig.json",
} |
Thank you, now everything works for me |
What happened?
After upgrading @quasar/app-vite from "^2.0.0-beta.24" to "^2.0.0-rc.2" and following the migration guide, typescript does not recognize the imports from '#q-app/wrappers', for example in quasar.config.ts.
I'm getting the following error:
Cannot find module '#q-app/wrappers' or its corresponding type declarations.ts(2307)
After investigating the issue, I found that the tsconfig.json generated under .quasar directory does not correctly map the paths related to node_modules.
For example:
"#q-app": [
"./../node_modules/@quasar/app-vite/types/index.d.ts"
],
In my environment, there's no node_modules in this location, because the quasar project is under a monorepo. For my environment, the correct should be:
"#q-app": [
"./../../../node_modules/@quasar/app-vite/types/index.d.ts"
],
That is, node_modules is two directory levels behind what was generated.
What did you expect to happen?
quasar prepare
should generate .quasar/tsconfig.json considering the correct location of node_modules.Reproduction URL
https://stackblitz.com/edit/quasarframework-stackblitz-templates-zkxysz?file=packages%2Fquasar-project%2Fquasar.config.ts
How to reproduce?
Upgrade @quasar/app-vite from "^2.0.0-beta.24" to "^2.0.0-rc.2" in a monorepo environment.
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
TypeScript Support, SPA Mode
Platforms/Browsers
Microsoft Edge
Quasar info output
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: