npm start
fails to run in generated project if parent directory contains file named .config
#13355
Labels
npm start
fails to run in generated project if parent directory contains file named .config
#13355
Describe the bug
When bootstrapping a new React app with CRA, I found that
npm start
fails within my project if a parent directory contains a file named.config
.This issue can be reproduced by running the following in a terminal:
cd $(mktemp -d) && touch .config && npx create-react-app my-app && cd my-app && npm start
Did you try recovering your dependencies?
No, I didn't try to recover -- but my module tree is not corrupted.
This issue occurs with the latest version of NodeJS (20.5.1) and NPM (10.0.0)
Which terms did you search for in User Guide?
Not relevant
Environment
Steps to reproduce
cd $(mktemp -d) && touch .config && npx create-react-app my-app && cd my-app && npm start
Expected behavior
Generated React app will start a web server, regardless of files existing outside of the project.
Actual behavior
Reproducible demo
https://github.com/jonhermansen/react-config-file-bug
git clone --depth 1 https://github.com/jonhermansen/react-config-file-bug.git cd react-config-file-bug npm start
The text was updated successfully, but these errors were encountered: