pnpm装包报错Run “pnpm install“ to recreate the modules directory.

一、先看报错

执行 pnpm install 装包报错

在这里插入图片描述
报错信息

 ERR_PNPM_PUBLIC_HOIST_PATTERN_DIFF  This modules directory was created using a different public-hoist-pattern value. Run "pnpm install" to recreate the modules directory.

二、解决方法

  1. 在项目根目录中,删除 node_modules 目录

  2. 打开终端,并确保你在项目根目录下

  3. 重新安装依赖
    在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_61402485/article/details/131620674