pnpm提示更新
今天加班的时候更新了项目依赖,下载依赖的时候提示pnpm有新版本可以使用了🎉,提示如下:
想着那就用新版本呗,按照提示,在item2敲出pnpm add -g pnpm的时候,结果提示报错了,报错提示如下:
zlk@Zhanglk ~ pnpm add -g pnpm
Nothing to stop. No server is running for the store at /Users/zlk/Library/pnpm/store/v3
ERR_PNPM_NO_GLOBAL_BIN_DIR Unable to find the global bin directory
Run "pnpm setup" to create it automatically, or set the global-bin-dir setting,
or the PNPM_HOME env variable. The global bin directory should be in the PATH.
提示使用pnpm setup来自动创建环境变量,挺好的,还给出了提示。
但是,我偏不按照你的来😎 😎
主打的就是一个叛逆。
解决办法
话不多说,那我是如何解决的呢?
cd到桌面,然后执行pnpm add -g pnpm,就好了
如下:
意不意外,惊不惊喜?