首頁 >web前端 >js教程 >修復 EPERM:不允許操作 (...$types.d.ts)

修復 EPERM:不允許操作 (...$types.d.ts)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原創
2024-09-01 21:09:02843瀏覽

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'

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

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
  1. Run CMD as admin and enter this:
npm config edit

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

It will open a notepad window/tab.

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

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

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

prefix=C:\Users\user\AppData\Roaming\npm

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

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

Happy Hacking!

以上是修復 EPERM:不允許操作 (...$types.d.ts)的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn