Dependencies not added when using NPX
See original GitHub issueHi. I am trying this template out with Node + Yarn on Windows. First I run this command:
npx create-react-app my-tailwind-app --template tailwindcss-typescript
But I found out that the generated project can’t be run right away.
I ended up adding these packages, either to global or to the project’s dependencies:
- npm-run-all
- delay-cli
- postcss
- postcss-cli
- autoprefixer
- typescript
- @types/react
- @types/react-dom
- @types/jest
- @testing-library/react
- @testing-library/jest-dom
Should these be described in README section for getting started?
Or better, should most of these be added to (dev) dependencies in the template from the start?
UPDATE
After testing further, it seems to be the issue with npx create-react-app
that does not add the dependencies to package.json
. Using yarn create react-app
did it as in this comment
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
npx create-react-app dependencies not working
1 Answer 1 · Error message same as i did before with your commands. Do you have a Node version that would be...
Read more >npx - npm Docs
This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar...
Read more >npx create-react-app is not working · Issue #10132 - GitHub
I am able to solve the problem by first trying to uninstall the npm globally, update the npm, clear the cache then using...
Read more >4 reasons to avoid using `npm link` - Hiroki Osame
Instead of using npm link , use npm install or npx link to symlink a local package as a dependency: Terminal. $ npx...
Read more >npm or Node package manager - Gatsby
You can also use npx to install Gatsby. npx ships with npm. ... Adding a plugin as a project dependency uses the same...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @quaos.
I beliee that was a problem before I had chance to update.
I’d appreciate if you could do PR for me to review ;p (before I get to alot time for this).
OK, now it works! Thanks!