create-react-app
create-react-app copied to clipboard
cannot build projects when cwd contains a pathname with !
Describe the bug
When having an ! in the build path (the cwd not the project name contains an !), react-scripts fails with a cryptic error.
This is quite easy to reproduce.
Steps to reproduce
(Write your steps here:)
- create a directory name with ! in it's name, e.g. foo/!A_Kabumm/
- switch to the directory
- npx create-react-app my-app
- cd my-app
- npm start
The last command crashes with: configuration.cache.cacheDirectory: The provided value "/home/alex/tmp/!A_foo/my-app/node_modules/.cache" contains exclamation mark (!) which is not allowed because it's reserved for loader syntax.
Expected behavior
It doesn't crash.
I am not sure if it is actually a webpack bug but I found it because of this project.
sry it seems to be a webpack bug. Close or keep and warn the users?