Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Java 및 이클립스 설치
- explode #선택제거 #PHP explode
- HAVING 절
- DATE_ADD()
- BufferedReader #BufferedWriter
- DATE_FORMAT()
- Now()
- 가상화
- sql용어
- Java환경변수 설정
- 영카트 #테스트메일
- apt #apt 명령어 #apt-get명령어
- CURTIME()
- trim #공백 제거 #PHP trim()
- db접속
- SQL 중복제거
- CURDATE()
- DATEDIFF()
- PHP달력관련함수
- MySQL 날짜 관련 함수
- DATE_SUB()
- apt-get #apt-get 옵션 #apt-get options
- PDO #DB접속
- php5.x
- strip_tags #html태그제거 #PHP strip_tags
- 배열관련함수
- 함수정의확인
- 이클립스 설치
- serializeObject
- JSTL
Archives
- Today
- Total
M
Vue + TypeScript 설치 본문
1. Node 설치
brew node install
> node -v 명령어로 설치 확인
node -v
2. Vue 설치
- vue 2.x
npm install vue-cli -global
- vue 3.x
npm install -g @vue/cli
설치 시 오류 관련
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/@vue
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/@vue'
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.
해결방법
1. sudo를 통한 해결
보안이슈, 폴더 꼬임 등 문제 발생 가능성이 있음
또 다른 오류
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:520:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
- 해결방법
npm 캐시 지우기
sudo npm cache clear --force
3. vue 프로젝트 생성
vue create [project-name]
- 옵션 선택
# 옵션 선택
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, TS, Router, Vuex, Linter
? Choose a version of Vue.js that you want to start the project with 3.x
? Use class-style component syntax? Yes
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
728x90
'Vue' 카테고리의 다른 글
[Vue3] ref와 reactive 차이점 (0) | 2024.08.29 |
---|---|
[vue3] v-model 내장 수정자 (0) | 2024.08.27 |
[Vue3] defineModel (0) | 2024.08.27 |
Vue 관련 패키지 추천 (0) | 2024.08.15 |