javascriptnpmdependenciesnode-modulesyarnpkg

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


I'm creating a new project with gatsby

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

and get an error:

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

Any idea how I can work around this npm ERR! Unsupported URL Type "workspace:": workspace:*?


Solution

  • I was able to fix this issue by using yarn instead of npm.