-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
TS2307: Cannot find module '#imports' or its corresponding type declarations. with webstorm #14880
Comments
Okay, and just by opening a bug report, I found my issue ;-) I still had paths overwritten in my tsconfig. Removing this, fixes the issue ;-) my tsconfig is now just:
|
I have a different situation, my directory structure is "~/nuxt/demo1":
nuxtjs/i18n: useI18n(), useLocalePath() |
It took a LOT of trial and error for me to resolve this issue, so just jotting down some notes here in case this helps anyone else:
|
Using nuxt in monorepo and having the same issue. I am extending the tsConfig, everything works well except for paths with hash and this is annoying because I can't get types :( |
@matthew-dean |
@meddle1 No problem! |
Environment
Linux
v18.9.0
3.0.0-rc.9
0.5.1
npm@8.19.1
vite
srcDir
,typescript
,head
,loading
,css
,middleware
,runtimeConfig
,tailwindcss
,modules
,env
,build
@nuxtjs/tailwindcss@5.3.3
,~/modules/dashboardcore.ts
,~/modules/auto-import-eslint.ts
-
Reproduction
as this is IDE related, there is no classical reproduction script possible. But it happens also with a plain nuxt3 project.
What I have in my setup:
.nuxt/tsconfig.josn even has paths in it with "#imports":
![image](https://user-images.githubusercontent.com/5757263/189610541-05d97d6f-ca93-4ffc-bcbb-79f4abd3afcd.png)
Describe the bug
IDE doesn't resolve types anymore:
![image](https://user-images.githubusercontent.com/5757263/189610613-a62a53b0-5e60-457a-a9d0-a85f08d600b8.png)
the funny thing is, if open the imports.d.ts, types are working in there. So it seems it's just not picking up the initial tsconfig settings. Maybe an IDE bug?
Additional context
tested in WebStorm 2022.2.1
Build #WS-222.3739.57, built on August 16, 2022
also restarted the typescript engine and other stuff,
Logs
No response
The text was updated successfully, but these errors were encountered: