Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 pnpm 安装 vue create 会 报错 #7284

Open
king-open opened this issue Aug 28, 2022 · 17 comments
Open

使用 pnpm 安装 vue create 会 报错 #7284

king-open opened this issue Aug 28, 2022 · 17 comments

Comments

@king-open
Copy link

Version

5.0.8

Environment info

macos12.5  pnpm7.9.0

Steps to reproduce

vue create back

选择 pnpm 报错

What is expected?

正常能够使用pnpm构建项目依赖

What is actually happening?

安装使用pnpm 出现以下错误
command failed: pnpm install --reporter silent --shamefully-hoist --registry=https://registry.npmmirror.com/

@king-open
Copy link
Author

Follow the tips my friend gave me

mkdir back && cd back && pnpm init && vue create . 

still wrong

@king-open
Copy link
Author

I have tried to use create-vue in slowly getting used to

@lvqq
Copy link
Contributor

lvqq commented Sep 2, 2022

You can add strict-peer-dependencies=false in .npmrc file and it may work

@king-open
Copy link
Author

nope, same error

@lvqq
Copy link
Contributor

lvqq commented Sep 2, 2022

Yeah, I just found it that the error interrupted the process of installing, and the next process of generating files wouldn't execute. So the method won't work, maybe another solution is to degrade pnpm to 6.x because the installing is build-in.

@linghengqian
Copy link

You can start a new line in .npmrc and add auto-install-peers=true. This works for pnpm v6 and pnpm v7. 👀

@king-open
Copy link
Author

i try first

@king-open
Copy link
Author

Wow, lowering pnpm to 6 works fine . amazing

@king-open
Copy link
Author

thanks man

@lvqq
Copy link
Contributor

lvqq commented Sep 2, 2022

You can start a new line in .npmrc and add auto-install-peers=true. This works for pnpm v6 and pnpm v7. 👀

That won't work because .npmrc file will be overwrite by cli🤣

@king-open
Copy link
Author

Yeah

@linghengqian
Copy link

You can start a new line in .npmrc and add auto-install-peers=true. This works for pnpm v6 and pnpm v7. 👀

That won't work because .npmrc file will be overwrite by cli🤣

  • There are two ways.
  • One is to submit a PR with additional processing auto-install-peers=true. I'm still waiting for a friend who has permission to merge the PR to review and compare fix: pnpm v7 install error #7265.
  • The other is to switch nodejs corepack to pnpm v6 to initialize the project, and then switch nodejs corepack to pnpm v7 to execute pnpm install, which also requires manually adding auto-install-peers=true.

@king-open
Copy link
Author

So if I add that sentence to .npmrc first, it's fine

@linghengqian
Copy link

This issue was fixed in #7265 and should be closed.

@king-open
Copy link
Author

ok thanks

@Wang-zhetao
Copy link

Why doesn't it work anymore

@zkl00
Copy link

zkl00 commented Apr 13, 2023

pnpm i 提示这个错误
no such file or directory, stat 'Users\admin\Desktop\demo\dome_vue3\node_modules.pnpm\jsdom@21.1.0\node_modules\decimal.js'

这是什么原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants