Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No files matching 'path/to/app/src/.' were found. #9902

Closed
pablozoani opened this issue Oct 24, 2020 · 31 comments
Closed

No files matching 'path/to/app/src/.' were found. #9902

pablozoani opened this issue Oct 24, 2020 · 31 comments

Comments

@pablozoani
Copy link

pablozoani commented Oct 24, 2020

Describe the bug

I have recently installed a new project with npx create-react-app my-app and tried to run it with npm start my-app.
There is an empty space in the path, in example:

'C:/some folder/my-app'
        ^

I receive a message:

Failed to compile
No files matching 'C:/some folder/my-app/src/.' were found.

If i use a path without empty spaces for my app, everything works fine.
Is important to note that this error started yesterday.

Which terms did you search for in User Guide?

I searched in the recent issues, but not found anything relevant. This problem started to happen yesterday, so I think it has to do with the new version, the previous one works fine.

Environment

The problem persist in Ubuntu and Windows, I tested in both.
npm 6.14.5
node 12.18.2

Steps to reproduce

  1. $mkdir './my project/app'
  2. $cd 'my project/app'
  3. $npx create-react-app my-app
  4. $cd my-app
  5. $npm run start

Expected behavior

New browser window opens with the React logo.

Actual behavior

Failed to compile

No files matching 'C:/my project/app/src/.' were found.

This error occurred during the build time and cannot be dismissed.

Regards

@kaganince1
Copy link

Same issue here! Couldnt find a solve

@haddly
Copy link

haddly commented Oct 25, 2020

I found that if you Ctrl + C in the terminal and do npm start again, this error does not show again.

@kaganince1
Copy link

I found that if you Ctrl + C in the terminal and do npm start again, this error does not show again.

Tried it many times didnt work for me

@kaganince1
Copy link

Solved it with changing project directory to another disk and make it shorter. npm start and it worked.

@pablozoani
Copy link
Author

Solved it with changing project directory to another disk and make it shorter. npm start and it worked.

Thats avoided, not solved!

@raptor3790
Copy link

Solved it with changing project directory to another disk and make it shorter. npm start and it worked.

That's what issue itself.

@n3tr
Copy link
Contributor

n3tr commented Oct 27, 2020

@pablozoani can you try

  • npm install -g create-react-app
  • create-react-app my-app instead of using npx

I remember there is a similar issue with the npx (#6512)

@daviemola
Copy link

ctr c and npm run dev worked for me

@Julien-Bidar
Copy link

Same issue here!

@elcontrastador
Copy link

elcontrastador commented Oct 28, 2020

Check to ensure your ENTIRE absolute path to your project has no spaces or non-standard metacharacters in it...or move/re-create the project to a folder that complies. The main dropbox folder is a common culprit for spaces and parentheses. This is absolutely a bug and should be fixed.

@Dilara26-cyber
Copy link

I did everything from start, re-load the react and it started to work.

@lalapolalaanewb
Copy link

as mentioned by @elcontrastador. You just need to make sure every of your parent directory must not have spaces. I just encountered this issue, and this helps me fixed it.

For example, I have something like this before:- E:/React Projects/Personal Projects/Intermediate Projects/My Project A/client

this should change to:- E: ReactProjects/PersonalProjects/IntermediateProjects/MyProjectA/client

Now you can 'npm start' and your project should run and work just fine. As for why this bug occurs even I didn't know yet. Everything works fine before it happens. No changes made at all except making changes to my project CSS. Suddenly I got this error. Anyway, I'm glad everything works fine now.

@palakyadav1807
Copy link

I have the same issue. Plzzzzzz help!

@AdrianBirta
Copy link

@elcontrastador Thanks! It's working! 👍

@bradisadeveloper
Copy link

Check to ensure your ENTIRE absolute path to your project has no spaces or non-standard metacharacters in it...or move/re-create the project to a folder that complies. The main dropbox folder is a common culprit for spaces and parentheses. This is absolutely a bug and should be fixed.

That's exactly what happened. Thank you for this. Annoying as hell though with that bug.

@Julien-Bidar
Copy link

thanks @elcontrastador it worked for me

@pablozoani
Copy link
Author

@pablozoani can you try

* `npm install -g create-react-app`

* `create-react-app my-app` instead of using `npx`

I remember there is a similar issue with the npx (#6512)

Did work with ubuntu and react 17.0.1, didn't tried other OS

@Efo-Koku
Copy link

I have the same problem, my React localhost outputs this error message:

_"Failed to compile

No files matching 'Users/MyName/seasons/src/.' were found.

This error occurred during the build time and cannot be dismissed."_

My terminal also outputs a similar error message: "Failed to compile...."

I don't have any spaces in my path yet the error persists. I have created several react apps in the past without any issues.

Any help and or suggestions would be greatly appreciated.

@shuchitpant
Copy link

I have the same problem
is there any solution up till now??
image

@shahnewaztameem
Copy link

@elcontrastador your solution worked fine for me. It's just a parent directory naming issue. To those who encountered the error make sure your parent directory does not contain any spaces.

@Efo-Koku
Copy link

@shuchitpant In my case I was creating an app that required the use of my location which I had set to "Block", changing this to "Allow" got rid of the error and everything works fine now.

@DutchJelly
Copy link

DutchJelly commented Oct 31, 2020

image
I'm also having the same issue, and I really can't change the directory name (it's my users's folder).

I used the globally installed create-react-app with the typescript template (create-react-app --template typescript).

@Efo-Koku where exactly can I allow the use of my location?

@Efo-Koku
Copy link

Efo-Koku commented Nov 1, 2020

@DutchJelly
See my screenshot of the error message: "Failed to compile".
In the address bar where it says "localhost", click on the circled icon to the left and select the dropdown menu next to "Location".

@DutchJelly
Copy link

Changing the location setting doesn't work for me. When I reload I do see my react page for a split second before it gives me the error, but the Location setting doesn't influence this.

So I figured I'd try it at the root of my C-drive, and that avoids the issue like others mentioned before.

@beaverinho
Copy link

Check to ensure your ENTIRE absolute path to your project has no spaces or non-standard metacharacters in it...or move/re-create the project to a folder that complies. The main dropbox folder is a common culprit for spaces and parentheses. This is absolutely a bug and should be fixed.

Thx! Removing the space from the project name resolved my issue

@jwhubert91
Copy link

I fixed this just by running npm run start as mentioned above. The first time, when this failed, I used yarn start instead. Still not sure what happened under the hood.

@adewale-codes
Copy link

Please help I have the same issue

@adewale-codes
Copy link

I fixed this just by running npm run start as mentioned above. The first time, when this failed, I used yarn start instead. Still not sure what happened under the hood.

Thanks this worked

@djrolleyes
Copy link

the issue because of space char in the path... just create a dir without spaces and it works just fine

@stale
Copy link

stale bot commented Dec 19, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Dec 19, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests