I am learning Svelte currently and I am not sure what is causing this error. The error exists within every one of my .svelte
files, though it is not actually preventing the app from running.
I am using VSCode and at the top of each of my .svelte
files, if I hover over <script lang="ts">
, it shows the following error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/adapter-static' imported from svelte.config.js
In my svelte.config.js
I have this import:
import adapter from '@sveltejs/adapter-static';
And in my package.json
I have "@sveltejs/adapter-static": "3.0.1"
under devDependencies
I have tried restarting VSCode, rerunning pnpm install
and a handful of other suggestions I found while searching this error, but so far I haven't had any luck getting the error to go away.
Any ideas?