Notice
Recent Posts
Recent Comments
Tags
- asp.net Select
- Mac Oracle
- javascript 바코드스캔
- 파일업로드 체크
- 404에러페이지
- 하드 마이그레이션
- 바코드 생성하기
- 바코드 스캔하기
- 타임피커
- jquery 바코드
- XSS방어
- asp.net core Select
- asp.net dropdownlist
- php 캐쉬제거
- 맥 오라클설치
- 하드 윈도우 복사
- javascript 유효성체크
- ViewData
- 강제이동
- 말줄임표시
- ASP.Net Core 404
- SSD 복사
- 파일업로드 유효성체크
- javascript 바코드 생성
- TempData
- jquery 바코드생성
- XSS PHP
- javascript redirection
- django 엑셀불러오기
- ViewBag
웹개발자의 기지개
[Vue.js] mac 상에서 npm 이용시 Error - 권한설정 문제로 해결하자. 본문
javascript/Vue.js
[Vue.js] mac 상에서 npm 이용시 Error - 권한설정 문제로 해결하자.
http://portfolio.wonpaper.net 2023. 8. 21. 16:12폴더권한 문제 때문에 발생한다.
sudo 명령어를 앞에 sudo npm ~~ 이런식으로 붙여서 설치하면 대부분 해결된다.
이는 일시적인 해결법이다.
아래 log 내용을 보면 친절하게 설명해놓았다.
영구적인 해결방법으로 (필자의 폴더경로상황)
sudo chown -R 501:20 "/Users/jongwon/.npm"
아래에 필자의 log 정보를 남겨놓았다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
jongwon@ijong-won-ui-MacBookPro ~ % cd vue_study
jongwon@ijong-won-ui-MacBookPro vue_study % vue create vue_test1
Vue CLI v5.0.8
? Please pick a preset: Default ([Vue 3] babel, eslint)
Vue CLI v5.0.8
✨ Creating project in /Users/jongwon/vue_study/vue_test1.
🗃 Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /Users/jongwon/.npm/_cacache/index-v5/39/40
npm ERR! errno EACCES
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 501:20 "/Users/jongwon/.npm"
npm ERR! A complete log of this run can be found in: /Users/jongwon/.npm/_logs/2023-08-21T06_46_22_467Z-debug-0.log
ERROR Error: command failed: npm install --loglevel error --legacy-peer-deps
Error: command failed: npm install --loglevel error --legacy-peer-deps
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@vue/cli/lib/util/executeCommand.js:138:16)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)
jongwon@ijong-won-ui-MacBookPro vue_study %
jongwon@ijong-won-ui-MacBookPro vue_study % sudo chown -R 501:20 "/Users/jongwon/.npm"
Password:
jongwon@ijong-won-ui-MacBookPro vue_study %
Vue CLI v5.0.8
? Target directory /Users/jongwon/vue_study/vue_test1 already exists. Pick an action: Overwrite
Removing /Users/jongwon/vue_study/vue_test1...
Vue CLI v5.0.8
? Please pick a preset: Default ([Vue 3] babel, eslint)
Vue CLI v5.0.8
✨ Creating project in /Users/jongwon/vue_study/vue_test1.
🗃 Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
added 862 packages, and audited 863 packages in 19s
94 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
🚀 Invoking generators...
📦 Installing additional dependencies...
added 101 packages, and audited 964 packages in 4s
107 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
⚓ Running completion hooks...
📄 Generating README.md...
🎉 Successfully created project vue_test1.
👉 Get started with the following commands:
$ cd vue_test1
$ npm run serve
|
cs |
참고 : https://codingapple.com/unit/vue-3-installation-with-vue-cli/
'javascript > Vue.js' 카테고리의 다른 글
[Vue.js] Vue 실습해보기 (설치,실행, 프로젝트 생성) (0) | 2023.09.28 |
---|---|
[Vue.js] Swiper 슬라이드 적용하기 (Ver6) (0) | 2023.09.21 |
[Vue.js] error Component name "main" should always be multi-word vue/multi-word-component-names 에러날때 (0) | 2023.09.18 |
[Vue.js] Vue.js devtools 크롬 확장프로그램 (0) | 2023.09.03 |
[Vue.js] 포트변경하기 (0) | 2023.09.01 |
Comments