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 install报错的处理方法 #567

Open
dgdongjb opened this issue Dec 6, 2024 · 0 comments
Open

pnpm install报错的处理方法 #567

dgdongjb opened this issue Dec 6, 2024 · 0 comments

Comments

@dgdongjb
Copy link

dgdongjb commented Dec 6, 2024

pnpm install报错

 ERR_PNPM_META_FETCH_FAIL  GET https://registry.npmmirror.com/core-js: Value of "this" must be of type URLSearchParams
 WARN  GET https://registry.npmmirror.com/chalk error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/debug error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmmirror.com/espree error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 ERR_PNPM_META_FETCH_FAIL  GET https://registry.npmmirror.com/regenerator-runtime: Value of "this" must be of type URLSearchParams
 WARN  GET https://registry.npmmirror.com/ignore error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 ERR_PNPM_META_FETCH_FAIL  GET https://registry.npmmirror.com/magic-string: Value of "this" must be of type URLSearchParams
 WARN  GET https://registry.npmmirror.com/esquery error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
 ERR_PNPM_META_FETCH_FAIL  GET https://registry.npmmirror.com/systemjs: Value of "this" must be of type URLSearchParams
 WARN  GET https://registry.npmmirror.com/esutils error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

环境:node v20.18.0
解决办法:修改package.json
"packageManager": "[email protected]",
改成 "packageManager": "[email protected]",

修改后pnpm install安装依赖成功
pnpm dev启动成功
http://localhost:4000/访问正常
注意:需要将/src/router/index.ts中
children: [
{
path: '/redirect/:path(.)',
name: 'Redirect',
component: () => import('@/views/Redirect/Redirect.vue'),
meta: {}
}
],
改成
children: [
{
path: '/redirect/:path(.)',
name: 'Redirect1',
component: () => import('@/views/Redirect/Redirect.vue'),
meta: {}
}
],
Redirect改成Redirect1,否则会报Redirect重复

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

1 participant