> ## Content Index
> Fetch the complete content index at: https://debug.my.id/llms.txt
> Use this file to discover other available public pages before exploring further.

# Cara mudah mengatasi npm install error code EPERM errno -4048 operation not permitted
- URL: https://debug.my.id/npm-install-error-4048-operation-not-permited/
- Published: 2017-09-08T03:23:00.000Z
- Updated: 2025-06-24T16:20:52.000Z
- Author: Tukang Debug
- Tags: NodeJS, Tip/trik

jika anda menggunakan node dan npm, dan mengalami error dengan [kode 4048 pada saat melakukan npm install](https://debug.my.id/npm-install-error-4048-operation-not-permited/), berikut ini adalah cara mudah untuk mengatasi error tersebut.

Contoh pesan error yang muncul :

```bash
npm ERR! path ...\node_modules\fsevents\node_modules\ansi-regex\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink '...fsevents\node_modules\ansi-regex\package.json'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, unlink '...\fsevents\node_modules\ansi-regex\package.json'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'...\\node_modules\\fsevents\\node_modules\\ansi-regex\\package.json\'\n at Error (native)'

npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: '...\\node_modules\\fsevents\\node_modex\\package.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! ...\npm-cache\_logs\2017-09-08T09_53_36_343Z-debug

```

Berikut ini adalah beberapa alternatif solusi yang dapat anda coba.

1. Pastikan anda menutup semua editor yang mungkin saat itu sedang membuka file package.json. Lalu ulangi lagi perintah : **npm install**
2. Hapus cache dengan perintah : **npm cache clean**
3. Jika anda menggunakan npm versi 5.4, maka untuk saat ini silahkan downgrade ke versi 5.3  
**npn install -g npm@5.3**
4. Jika semua cara di atas tidak bisa, maka silahkan coba cara terakhir yaitu dengan meng-uninstall lalu menginstall lagi **nodejs**

Sekian dan selamat mencoba, semoga berhasil.