总是在安装全局包时出现下面这个错误
ERR_PNPM_VIRTUAL_STORE_DIR_MAX_LENGTH_DIFF This modules directory was created using a different virtual-store-dir-max-length value. Run "pnpm install" to recreate the modules directory.
这需要把 \global\5
下的东西全部删除,然后再安装相关包。
通过 pnpm add -g
方式安装的包,要能让 node.exe 来找到执行
查看 pnpm 安装包路径
pnpm root -g
显示
C:\Users\用户名\AppData\Local\pnpm\global\5\node_modules
然后 node-shell.bat
@echo off
cd /d "%~dp0"
@path=C:\Users\%USERNAME%\scoop\persist\nvm\nodejs\nodejs;C:\Users\%USERNAME%\AppData\Local\Yarn\bin;%path%
set NODE_PATH=C:\Users\%USERNAME%\AppData\Local\pnpm\global\5\node_modules
::CALL "%~dp0\setenv.bat"
C:
cd /d "%~dp0"
set http_proxy=http://127.0.0.1:8080
set https_proxy=http://127.0.0.1:8080
START "Node.js Environment" cmd