使用此代码安装纱线后,我收到此消息。那么我应该如何在我的项目上安装yarn呢?使用 Windows 11。
npm install -g yarn
changed 1 package, and audited 2 packages in 922ms
found 0 vulnerabilities
(yar : The term 'yar' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ yar -v)
我希望在我的项目中安装yarn并且nodemodule文件夹不仅仅是8 Mg...
全局安装yarn
npm install --global yarn
检查版本
yarn --v
确保环境路径设置正确。如果未设置,则复制以下位置
users/../AppData/Roaming/npm/node_modules/yarn/bin
并将其粘贴到环境变量中的路径下。