I had an issue running my sveltekit dev server. I kept getting this issue:
EPERM: operation not permitted, stat 'C:\Users\user\Documents\Github\SvelteKit\Goremote Africa\main\.svelte-kit\types\src\routes\$types.d.ts'
Here's how to solve it:
- This didn't solve anything, but you might want to clear your npm cache first:
npm cache clean --force
- Run CMD as admin and enter this:
npm config edit
It will open a notepad window/tab.
- Set
prefix
variable toC:\Users\user\AppData\Roaming\npm
. Remember to changeuser
to your username:
prefix=C:\Users\user\AppData\Roaming\npm
Save and close the notepad window and run your development server. It should work now:
Happy Hacking!