lgvv98

[Tuist] Mise Install 본문

apple/DesignPattern & Architecture

[Tuist] Mise Install

lgvv 2024. 8. 31. 00:16

[Tuist] Mise Install

Tuist 3점대에서 4점대로 바꾸려고 Tuist 문서에 들어가니까 Mise를 추천한다고 되어 있어서 학습하고자 함.

 

사실상 에러 해결의 과정에 가까움.

 

Tuist 3점대 사용하고 있었다면, 설치 해제부터 시작하기.

Tuist uninstalled

 

 

Tuist 공식문서

 

 

Mise는 아래 공식 문서에 따라 학습

 

https://mise.jdx.dev/getting-started.html

 

Getting Started | mise-en-place

 

mise.jdx.dev

 

 

1. mise 설치

curl https://mise.run | sh
~/.local/bin/mise --version
mise 2024.x.x

 

mise CLI를 설치하고 mise 버전 확인

 

 

2. Active mise & Alternative: Add mise shims to PATH

# bash
$ echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc

# zsh
$ echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc

# fish
$ echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish

 

Mise 경로 오류

 

해당 부분 수행할 때 권한이 없는 경우

// 1. .zshrc 파일의 현재 권한 확인
ls -l ~/.zshrc

// 2. .zshrc 파일의 소유자 변경
sudo chown $(whoami) ~/.zshrc

// 3. .zshrc 파일의 쓰기 권한 수정
chmod u+w ~/.zshrc

 

mise 설치 후 command not found

// 1. PATH 추가: mise가 설치된 경로 (~/.local/bin)를 시스템 PATH에 추가해줘야 합니다. 
// .zshrc 파일에 다음과 같은 라인을 추가

export PATH=$PATH:~/.local/bin

// 2. .zshrc를 다시 로드
source ~/.zshrc

 

 

 

 

3. Adding tools to mise (optional)

 

node.js 설치 및 node.js 전역 설정

 

mise use --global node@20
node -v
v20.x.x

 

 

아래의 오류가 발생할 경우

 

 

(base) geonwoolee@Geonui-MacBookPro TuistSample % mise use --global node@20
mise failed create_dir_all: ~/.config/mise
mise Permission denied (os error 13)
mise Run with --verbose or MISE_VERBOSE=1 for more information

 

아래처럼 해결

// 	권한 확인 및 수정: 터미널에서 sudo 명령어를 사용하여 해당 디렉토리를 생성할 수 있는지 시도
sudo mkdir -p ~/.config/mise

// 디렉토리 권한 변경: 기존 디렉토리가 있다면, 현재 사용자에게 해당 디렉토리의 접근 권한을 부여
sudo chown -R $(whoami) ~/.config/mise

 

 

 

3. Adding tools to mise (optional)

 

 

mise install tuist            # Install the current version specified in .tool-versions/.mise.toml
mise install tuist@x.y.z      # Install a specific version number
mise install tuist@3          # Install a fuzzy version number

mise install tuist            # 가장 최신 버전의 Tuist 설치
mise install tuist@x.y.z      # 특정 버전의 Tuist설치
mise install tuist@3          # 퍼지 버전 번호를 사용하여, 버전 3으로 시작하는 tuist의 최신 버전을 설치
mise use tuist@x.y.z          # 현재 프로젝트에서 tuist-x.y.z 버전을 사용하도록 설정
mise use -g tuist@x.y.z       # 버전을 전역 기본값으로 사용하도록 설정합니다. -g 옵션은 전역(global) 설정을 의미
mise use tuist@latest         # 현재 디렉토리에서 사용 가능한 tuist의 최신 버전을 사용하도록 설정합니다.
mise use -g tuist@system      # 시스템에 설치된 tuist를 전역 기본값으로 사용하도록 설정합니다. -g 옵션은 여기서도 전역 설정

 

 

이미 Tuist가 있는 경우 오류가 날 수 있어서 후 실행

Tuist uninstalled

 

결과 !

 

 

 

 

 

 

 

(참고)

https://docs.tuist.io/guides/quick-start/install-tuist

 

Install Tuist | Tuist

 

docs.tuist.io

 

 

https://mise.jdx.dev/getting-started.html

 

Getting Started | mise-en-place

 

mise.jdx.dev

 

 

https://velog.io/@junlight94/Tuist%EC%84%A4%EC%B9%98-%EB%B0%8F-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EC%A0%81%EC%9A%A9

 

Tuist설치 및 프로젝트 적용

안녕하세요 제이븐입니다 😁 이번에는 Tuist설치와 기본세팅에 대해서 알아보겠습니다!! 2024.03.09 기준입니다 Tuist 설치 여기서 잠깐 기존에 curl로 설치하는 방식이 Deprecated 되었습니다. 기존에

velog.io

 

'apple > DesignPattern & Architecture' 카테고리의 다른 글

Clean Architecture Swift #2  (0) 2022.09.29
Clean Architecture Swift #1  (0) 2022.09.23
[Swift] Coodinator Pattern  (2) 2022.07.07
[Swift] Command Pattern  (1) 2022.07.05
[Swift] Composite Pattern  (1) 2022.06.15
Comments