3 ms·
That's true if by "official documentation" you mean the Google search result page. Google Search Features gives a summary box that's as ambiguous as you describ
by brlewis 8y ago
That's true if by "official documentation" you mean the Google search result page. Google Search Features gives a summary box that's as ambiguous as you describe. Click through to the actual page, though, and you get a single, simple set of startup commands.
https://github.com/facebook/create-react-app#quick-overview https://github.com/facebook/create-react-app#quick-overview
EDIT: For reference, the URL where I see the ambiguous startup steps: https://www.google.com/search?client=firefox-b-1-d&q=create-react-app https://www.google.com/search?client=firefox-b-1-d&q=create-...
- runako 8y agoThe Github page you linked is the page I was referencing as "official documentation". From that page: - "To create a new app, you may choose one of the following methods:" (then suggests npx, npm, or yarn) - "npm start or yarn start Runs the app in development mode." - Even from right below the anchor you linked: "(npx comes with npm 5.2+ and higher, see instructions for older npm versions)" This is in reference to the overview commands of npx create-react-app my-app cd my-app npm start which add to the ambiguity further down the page...Should I use npm or npx? Can I mix them? The quick overview uses both. This is all confusing to newbies. I have no idea why they don't pick one way to do things (or at least explain why one might choose one vs the other).
- brlewis 8y ago"(npx comes with npm 5.2+ and higher, see instructions for older npm versions)" To me it seems obvious that you use npx unless you're stuck with an older npm version, or you're already using yarn.
- runako 8y agoWhy would that be obvious to a person new to the ecosystem? npx and npm coexist. They have overlap in functionality. They are both referenced in the instructions the user is reading. Why couldn't they just write that you should use npx if you have it? Or, since it works using npm too, why not just tell everyone to use npm? There are so many non-obvious things here. Why do we run some binaries via npm and others via npx? If you're going to use npm to run all the commands after create-react-app, why include npx in the document at all? If you use npx to create an app per the directions, why does the animated output tell you to use yarn to start it (and not npm as in the text immediately above)? Why does the animation then ignore the output and use npm to start it? The answers to these types of questions may be known to someone immersed in the ecosystem, but the presentation on the official page is definitely muddled and makes the answers far from obvious.