ERROR Error: command failed: pnpm install --reporter silent --shamefully-hoist

created at 06-14-2022 views: 9

problem

The error encountered when creating a new project with vue-cli and pnpm is shown in the following figure:

ERROR Error: command failed: pnpm install --reporter silent --shamefully-hoist 

solution

Install the version of pnpm@6 from the command line:

npm i pnpm@6 -g
vue create hello-world

You can also use npm to install directly without reporting an error, enter the code:

vue create hello-world -m npm

Both of the above methods have been tested and are feasible

created at:06-14-2022
edited at: 06-14-2022: