Open AskAlice opened 3 years ago
Check your yarn global add list
% yarn global list
info "create-react-app@4.0.3" has binaries:
- create-react-app
if yarn has CRA binaries you can remove it
% yarn global remove create-react-app
and you excute npx
% npx create-react-app my-app
How is it executed?
I think you're misunderstanding. This isn't a configuration issue. I have never really used yarn... like ever.
But sure, here's the output.
❯ yarn global list
yarn global v1.22.4
Done in 0.06s.
❯ yarn global remove create-react-app
yarn global v1.22.4
[1/2] Removing module create-react-app...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
Describe the bug
by using NPX it implies that the user wants to use NPM, however create-react-app forces the zucc onto the users with yarn anyway.
Did you try recovering your dependencies?
Yes. This does fix the issue. But that's not the problem. The problem is that by using NPX it implies that I want to use NPM. If i were using yarn I would be using
yarn create react-app
Which terms did you search for in User Guide?
I searched for issues that are like this but I couldn't find any.
Environment
Steps to reproduce
Expected behavior
I expect it to use NPM to install. Yes I know there is a
--use-npm
flag, but that is beyond the point.the find command returns no output, implying there are no broken symlinks
Actual behavior
node_modules/.bin/node-which is a broken symlink.
Yes I understand that this is a compatibility issue with npm and yarn.. specifically on ubuntu (not a problem on windows), however, rather than taking this up with NPM I think it's better to blame create-react-app as yarnpkg was not expected to run in this situation as npx is provided by npm.
note this screenshot was taken after running
npx create-react-app thisbug && cd thisbug
thennpm i express --save
(Write what happened. Please add screenshots!)
Reproducible demo