having troible doing npm run build
Unanswered
Chinese Alligator posted this in #help-forum
Chinese AlligatorOP
i m suing next js with prsima while npm run dev works finr but when i run npm run build it do have issues ▲ Next.js 15.1.8
- Environments: .env.local, .env
Creating an optimized production build ...
glob error [Error: EPERM: operation not permitted, scandir 'C:\Users\rakaf\Application Data'] {
errno: -4048,
code: 'EPERM',
syscall: 'scandir',
path: 'C:\Users\rakaf\Application Data'
}
Failed to compile.
Error: EPERM: operation not permitted, scandir 'C:\Users\rakaf\Application Data'
- Environments: .env.local, .env
Creating an optimized production build ...
glob error [Error: EPERM: operation not permitted, scandir 'C:\Users\rakaf\Application Data'] {
errno: -4048,
code: 'EPERM',
syscall: 'scandir',
path: 'C:\Users\rakaf\Application Data'
}
Failed to compile.
Error: EPERM: operation not permitted, scandir 'C:\Users\rakaf\Application Data'
5 Replies
@Chinese Alligator i m suing next js with prsima while npm run dev works finr but when i run npm run build it do have issues ▲ Next.js 15.1.8
- Environments: .env.local, .env
Creating an optimized production build ...
glob error [Error: EPERM: operation not permitted, scandir 'C:\Users\rakaf\Application Data'] {
errno: -4048,
code: 'EPERM',
syscall: 'scandir',
path: 'C:\\Users\\rakaf\\Application Data'
}
Failed to compile.
Error: EPERM: operation not permitted, scandir 'C:\Users\rakaf\Application Data'
I see you are suing next.js with prisma, Can you try running npm run build after opening powershell as admin?
If you're already opening as admin, and still facing this, I just recommend you to use wsl.
Chinese AlligatorOP
Okay
Via admin it also don't work on the windows
I've faced similar errors a lot before, I just recommend using wsl