3 ms·
If a project like this uses Yarn? Is it possible to use it without Yarn?
by philliphaydon 8y ago
If a project like this uses Yarn? Is it possible to use it without Yarn?
- jbfm 8y agoYes, just replace yarn start with npm run start
- _eric 8y ago`npm start` works aswell
- asutekku 8y agoIt’s the first thing addressed in FAQ
- philliphaydon 8y agoAhhh i read the 'follow the tutorial' bit and then came back here to comment, I didn't see the FAQ at the bottom.
- alfonsodev 8y agoyes, it is posible, in practice the only difference is that some commands like build, eject, build:markdown you'll have to add the word run. `yarn build` equals `npm run build` `yarn eject` equals `npm run eject` and so on ... except install, start and test which work without run. `npm install` `npm start` `npm test` There is another difference which is about the .lock file, you can delete yarn yarn.lock and keep the package-lock.json that will be generated after you run npm install. To understand how this affect you need to understand semver and how the lock file works.
- philliphaydon 8y ago<3 thanks.
- ndstephens 8y agoI'm pretty sure that with the newer `create-react-app` version 2, it will use Yarn in your project if you have Yarn installed globally on your system. If you do, and you want to keep it there, but use npm in your created app, then add `--use-npm` when creating your project (`npx create-react-app myAppName --use-npm` Otherwise, if you don't have Yarn installed globally then it uses npm by default in your project.