윈도우에서 fnm 설치하기

junsangyu·2023년 11월 30일
post-thumbnail

fnm 깃허브
https://github.com/Schniz/fnm

윈도우에서 노드 버전 매니저인 fnm을 설치해 보자

1. winget으로 fnm 설치하기

powershell에서 winget으로 설치

winget install Schniz.fnm

2. fnm 노드 설치

사용할 노드 버전을 지정해서 설치해주자

fnm install 20

3. fnm powershell profile 설정

powershell에서 fnm으로 노드를 사용하려면 다음과 같은 profile을 추가해줘야한다

~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 파일 생성 후 다음과 같이 작성

fnm env --use-on-cd | Out-String | Invoke-Expression

Powershell Profile PSSecurityException 에러
profile을 추가하고 powershell을 실행해보면 에러가 뜨는 경우가 있다
ExecutionPolicy가 Restricted라서 profile을 실행 못하는 것 같다
powershell을 관리자 권한으로 실행 후 다음 명령어로 ExecutionPolicy를 바꿔주면 된다

Set-ExecutionPolicy RemoteSigned
profile
👨🏻‍💻

0개의 댓글