-
글쓴이글
-
2022년 6월 12일 17:10 #36066
Heok Joon참가자jasonmoon@Jasons-MacBook-Pro-2 nodeJS % sudo chown -R ownerName:/usr/local/lib/node_modules/nodemon
usage: chown [-fhnvx] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhnvx] [-R [-H | -L | -P]] :group file ...
jasonmoon@Jasons-MacBook-Pro-2 nodeJS % npm install -g nodemon
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/nodemon
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/nodemon'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jasonmoon/.npm/_logs/2022-06-12T08_08_56_314Z-debug-0.log
jasonmoon@Jasons-MacBook-Pro-2 nodeJS %처음에 설치할땐 문제가 없다가 이제서야 권한이 없다고 에러가 뜨는것같아서
sudo 어쩌고 저쩌고로 경로 입력해도 별반응이 없는것같은데 어떻게 해야할까요 ?
2022년 6월 12일 17:26 #36068
Heok Joon참가자jasonmoon@Jasons-MacBook-Pro-2 nodeJS % corepack enable
Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
yarn도 권한없음으로 다운을 못받고 위에 방식을 적용해도 별 소용이 없네요 구글엔 어떻게 검색해야 할까요?
2022년 6월 12일 17:31 #36070
Heok Joon참가자Change your file permissions... Like this
First check who owns the directory
ls -la /usr/local/lib/node_modules
it is denying access because the node_module folder is owned by root
drwxr-xr-x 3 root wheel 102 Jun 24 23:24 node_modules
so this needs to be changed by changing root to your user but first run command below to check your current user How do I get the name of the active user via the command line in OS X?
id -un OR whoami
Then change owner
sudo chown -R [owner]:[owner] /usr/local/lib/node_modules
OR
sudo chown -R ownerName: /usr/local/lib/node_modules
OR
sudo chown -R $USER /usr/local/lib/node_modules
뭐이런식으로 오너가 바뀌면 가능하다던데 가능할법한 이야기인가요 ??
2022년 6월 12일 22:38 #36084
codingapple키 마스터네 권한없다는 폴더에 권한주면 됩니다
아니면 sudo npm install 어쩌구 이런 식으로 입력해도 됩니다
-
글쓴이글
- 답변은 로그인 후 가능합니다.