728x90
반응형

mui 를 클론하고 npm install 을 실행하는 중 아래의 에러가 떴음

/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/lib/cli/validate-engines.js:31
    throw err
    ^

Error: EPERM: operation not permitted, uv_cwd
    at process.wrappedCwd (node:internal/bootstrap/switches/does_own_process_state:142:28)
    at process.cwd (/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:10:19)
    at new Config (/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:71:19)
    at new Npm (/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/lib/npm.js:67:19)
    at module.exports (/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/lib/cli/entry.js:21:15)
    at module.exports (/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/lib/cli/validate-engines.js:39:10)
    at module.exports (/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/lib/cli.js:4:31)
    at Object.<anonymous> (/Users/username/.nvm/versions/node/v22.12.0/lib/node_modules/npm/bin/npm-cli.js:2:25)
    at Module._compile (node:internal/modules/cjs/loader:1565:14)
    at Object..js (node:internal/modules/cjs/loader:1708:10) {
  errno: -1,
  code: 'EPERM',
  syscall: 'uv_cwd'
}

Node.js v22.12.0

 


해결 방법

 

1. VSCode 닫기

2. cmd 창 열어서 디렉터리를 홈으로 이동하기

cd /Users/[username]

 

3. npm 캐시 제거

npm cache clean --force

 

4. npm 최신 버전으로 업데이트하기

npm install -g npm@latest --force

 

5. 다시 npm 캐시 제거

npm cache clean --force

 

6. VSCode 열어서 하려던 작업 진행

 

 

 


출처 : https://ehddud100677.tistory.com/397

반응형
복사했습니다!