Skip to content

cannot build projects when cwd contains a pathname with ! #13606

@devkral

Description

@devkral

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:)

  1. create a directory name with ! in it's name, e.g. foo/!A_Kabumm/
  2. switch to the directory
  3. npx create-react-app my-app
  4. cd my-app
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions