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.

[ src + public ] folders are never generated

See original GitHub issue

Hi 😃

“Node”: 12.14.1 “npm”: 6.13.4 “react-scripts”: “3.3.0”

I completely unistalled create-react-app from npm global scope .

From the command prompt in Windows 10 i am running :

npx create-react-app my-app

But all i get is the below :


No matter how many times i run it i never get src folders 😦

Please give me a hint why this might happen .

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

samwighttcommented, Feb 3, 2020

Update on what the issue was for me, not sure if anyone else will find this helpful though:

I use WSL but have yarn installed on my Windows side of things, and somehow my .yarn folder on my Windows filesystem made it into the PATH of my Ubuntu installation. Removing the .yarn folder from my PATH, running an npm uninstall -g create-react-app, then running npx create-react-app test caused everything to work properly.

MikhailGAcommented, Jan 31, 2020

I had the same problem. It helped me:

Since create-react-app 3.3.0 it’s not longer recommended to use a global installation of CRA.

However, after following the recommended way, uninstalling CRA globally and using npm,I ran into the following problem for my new React project:

A template was not provided. This is likely because you’re using an outdated version of create-react-app.

It seems like CRA wasn’t properly uninstalled. I had to do the following:

After uninstalling it with npm uninstall -g create-react-app, check whether you still have it “installed” with which create-react-app on your command line. If it returns something (e.g. /usr/local/bin/create-react-app), then do a rm -rf /usr/local/bin/create-react-app to delete manually.

Afterward, I was able to use npx create-react-app my-app with the latest version of CRA where I would have the default template for the src/ folder.

Read more comments on GitHub >

github_iconTop Results From Across the Web

create-react-app doesn't generate public and src folders thus ...
I still have no idea what was the reason but I got it working doing these: -uninstalled create-react-app using npm uninstall -g create-react-app ......
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
This error is generated because the compiler is only able to import files from the src folder. Here, the CSS file is saved...
Read more >
How to Build a React Project with Create React App in 10 Steps
public is a folder that we can use to store our static assets, such as images, svgs, and fonts for our React app....
Read more >
How To Set Up a React Project with Create React App
The src/ directory contains the React JavaScript code for your project. Most of the work you do will be in that directory.
Read more >
Using the Public Folder - Create React App
Only files inside the public folder will be accessible by %PUBLIC_URL% prefix. If you need to use a file from src or node_modules...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found