I have been using pnpm instead npm for my new projects to try it out and i have ecountered an issue.
I will take my nuxt project as an example.
I first setup my project using the following command:
pnpx nuxi init my-project
I then install a dependency, let's say axios
pnpm add axios
when importing axios in a component i get the following error
import axios from 'axios'
TS7016: Could not find a declaration file for module axios
export default defineNuxtConfig({
devtools: {enabled: true},
})
TS2552: Cannot find name defineNuxtConfig.
to fix the issue i try to reinstall the dependencies by running pnpm install
but the issue remains.
i figured i could fix the issue by running npm install
.
For information:
My guess is that my IDE does not know where my node modules are even though the are clearly present in the project but i have no idea to be honst.
Do you have any idea where the issue could come from?
turns out the issue comes from wsl2 that doesn't properly support symlink as of November 2023.