「node.js v16.17.0」yarnをインストールする方法

環境
Windows 10 Home 64bit
node v16.17.0
npm 8.15.0

操作方法
1.node.jsのバージョンを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>node -v
v16.17.0
>node -v v16.17.0
>node -v
v16.17.0

2.npmのバージョンを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>npm -v
8.15.0
>npm -v 8.15.0
>npm -v
8.15.0

3.npm 経由でyarnをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>npm install -g yarn
>npm install -g yarn
>npm install -g yarn

 

yarnのバージョンを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>yarn -v
1.22.19
>yarn -v 1.22.19
>yarn -v
1.22.19

yarnの初期設定を行います

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>yarn init
yarn init v1.22.19
question name (user):
question version (1.0.0):
question description:
question entry point (index.js):
question repository url:
question author:
question license (ISC):
question private:
success Saved package.json
Done in 10.25s.
>yarn init yarn init v1.22.19 question name (user): question version (1.0.0): question description: question entry point (index.js): question repository url: question author: question license (ISC): question private: success Saved package.json Done in 10.25s.
>yarn init
yarn init v1.22.19
question name (user):
question version (1.0.0):
question description:
question entry point (index.js):
question repository url:
question author:
question license (ISC):
question private:
success Saved package.json
Done in 10.25s.

 

Node.js

Posted by arkgame