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

"Module not found" on Windows if directory name starts with "!" (exclamation mark) #3292

Closed
today- opened this issue Oct 17, 2017 · 1 comment

Comments

@today-
Copy link

today- commented Oct 17, 2017

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Yes, it's still reproducing with npm4

Environment

1, node -v
v8.7.0
2. npm -v
5.4.2
3. yarn --version
1.0.2
4. npm ls react-scripts
C:!w0rk\create-react-app-master
`-- (empty)

OS: Windows 7 x64

Steps to Reproduce

  1. Open cmd.exe or other windows terminal tool
  2. cd c:\
  3. git clone https://github.com/facebookincubator/create-react-app.git !test
  4. cd !test
  5. yarn
  6. yarn start

Expected Behavior

Succesfully compiling

Actual Behavior

Error in console:

Failed to compile.

multi ./packages/react-scripts/config/polyfills.js ./packages/react-dev-utils/webpackHotDevClient.js ./packages/react-scripts/template/src/index.js
Module not found: Can't resolve 'C:\' in 'C:\!test'

and in browser:

Html Webpack Plugin:
  Error: Child compilation failed:
  Entry module not found: Error: Can't resolve 'C:\' in 'C:\!test':
  Error: Can't resolve 'C:\' in 'C:\!test'

It seems to me that bug is in "enhanced-resolve" module, but I'm not sure.

I haven't tested it on macOS or Linux.

@gaearon
Copy link
Contributor

gaearon commented Nov 3, 2017

My guess is this will never work because Webpack uses ! for some custom behavior. So I guess this won't get fixed. Thanks for reporting though.

@gaearon gaearon closed this as completed Nov 3, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants