npm 错误!不支持的 URL 类型“工作区:”:工作区:*

pca*_*tre 53 javascript dependencies npm node-modules yarnpkg

我正在使用 gatsby 创建一个新项目

gatsby new YourProjectName2 https://github.com/Vagr9K/gatsby-advanced-starter

并得到一个错误:

info Creating new site from git:
https://github.com/Vagr9K/gatsby-advanced-starter.git

Cloning into 'YourProjectName2'...
remote: Enumerating objects: 420, done.
remote: Counting objects: 100% (420/420), done.
remote: Compressing objects: 100% (373/373), done.
remote: Total 420 (delta 44), reused 268 (delta 22), pack-reused 0
Receiving objects: 100% (420/420), 7.74 MiB | 11.79 MiB/s, done.
success Created starter directory layout
info Installing packages...

npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*

npm ERR! A complete log of this run can be found in:

 ERROR

Command failed with exit code 1: npm install
Run Code Online (Sandbox Code Playgroud)

知道我该如何解决这个问题npm ERR! Unsupported URL Type "workspace:": workspace:*吗?

小智 69

我能够通过使用yarn而不是解决这个问题npm

  • 这避免了有关 npm 的问题 (4认同)

th3*_*org 39

当我正在处理预期的项目pnpm但我正在使用npm它时,我收到了此错误。