question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

create-react-app fails to create project

See original GitHub issue

I can’t manage to create a new project using create-react-app. It only creates a package.josn file with this content (but no actual source files)

{ "name": "project", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.12.0", "react-dom": "^16.12.0", "react-scripts": "3.3.0" } }

Steps done:

  1. npm uninstall -g create-react-app
  2. npx create-react-app project --template typescript

Output:

A template was not provided. This is likely because you're using an outdated version of create-react-app. Please note that global installs of create-react-app are no longer supported.

OS: Windows 10 NPM: 6.13.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
heyimalexcommented, Dec 31, 2019

Why is it not working as expected with npx?

npx searches for globally-accessible bins, but also the bin folder of every node_modules at or above your current working directory. You probably have create-react-app installed higher in your directory tree. You can test this by seeing if adding the ignore existing flag makes it work: npx --ignore-existing create-react-app newapp.

0reactions
heyimalexcommented, Jan 13, 2020

@bmuenzenmeyer That does actually look a lot nicer!

Closing this as resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

create-react-app Failing to create a new ... - Stack Overflow
This is due to the network issues try to download all dependency one by one or try to clean cache "npm cache clean...
Read more >
npx create-react-app fails · Issue #12559 - GitHub
Describe the bug Command npx create-react-app my-app fails to complete Environment Environment Info: current version of create-react-app: ...
Read more >
What To Do if create-react-app Doesn't Work
Go to AppData/Roaming/npm to find your create-react-app files. You can find AppData/Roaming with %AppData% in the file explorer directory bar ( ...
Read more >
create-react-app: command not found (React) error [Solved]
Use `npx` to solve the error create-react-app: command not found, e.g. `npx create-react-app my-app` or install the package globally by running `npm install...
Read more >
Deployment | Create React App
You would need to add a 404.html file with the redirection code to the build folder before deploying your project, and you'll need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found