You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a yarn project, when CRA gets to the "Installing template dependencies using npm..." part, it uses, well, npm.
npm seems unable to understand dependencies of the form
"module": "workspace:*"
in package.json.
yarn dlx create-react-app appname #same problem using npx
fails when run in a project with such workspace:* dependencies.
In a multi-workspace project, CRA seems to process all the peer-level workspaces (via npm despite the fact that it is running in a yarn project). npm encounters dependencies of that workspace:* form, and errors out with
Run yarn in the top level directory, then execute:
npx create-react-app cra
Expected behavior
Create an app in the cra subdirectory with no errors.
Actual behavior
$ npx create-react-app cra # similarly for yarn dlx create-react-app cra
Creating a new React app in /path/to/tmp/cra-yarn/cra.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*
When you run using yarn dlx, you'll see:
Installing template dependencies using npm...
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*
Note that the package.json files declare that they use yarn. So it would make sense for the "nstalling template dependencies" action also to use yarn?
Reproducible demo
I'm attaching an archive with the above files. cra-yarn.tar.gz
The text was updated successfully, but these errors were encountered:
Describe the bug
In a
yarn
project, when CRA gets to the "Installing template dependencies using npm..." part, it uses, well, npm.npm
seems unable to understand dependencies of the formin
package.json
.fails when run in a project with such
workspace:*
dependencies.In a multi-workspace project, CRA seems to process all the peer-level workspaces (via
npm
despite the fact that it is running in ayarn
project).npm
encounters dependencies of thatworkspace:*
form, and errors out withEnvironment
Steps to reproduce
File hierarchy:
top-level
package.json
:workspace1/package.json
:workspace2/package.json
:Run
yarn
in the top level directory, then execute:Expected behavior
Create an app in the
cra
subdirectory with no errors.Actual behavior
When you run using
yarn dlx
, you'll see:Note that the
package.json
files declare that they useyarn
. So it would make sense for the "nstalling template dependencies" action also to useyarn
?Reproducible demo
I'm attaching an archive with the above files.
cra-yarn.tar.gz
The text was updated successfully, but these errors were encountered: