DEV Community

Abdullah Bashir
Abdullah Bashir

Posted on

2

Fix for EPERM: operation not permitted (...$types.d.ts)

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'
Enter fullscreen mode Exit fullscreen mode

Error

Here's how to solve it:

  1. This didn't solve anything, but you might want to clear your npm cache first:
npm cache clean --force
Enter fullscreen mode Exit fullscreen mode
  1. Run CMD as admin and enter this:
npm config edit
Enter fullscreen mode Exit fullscreen mode

npm config edit

It will open a notepad window/tab.

Notepad window

  1. Set prefix variable to C:\Users\user\AppData\Roaming\npm. Remember to change user to your username:

Prefix set

prefix=C:\Users\user\AppData\Roaming\npm
Enter fullscreen mode Exit fullscreen mode

Save and close the notepad window and run your development server. It should work now:

Now working

Happy Hacking!

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

SurveyJS custom survey software

JavaScript UI Library for Surveys and Forms

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

View demo