-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Describe the bug
- Using absolute imports to a project path that also exists in node_modules breaks
Did you try recovering your dependencies?
Yes
Environment
Environment Info:
current version of create-react-app: 3.3.1
running from /Users/afrankel/.config/yarn/global/node_modules/create-react-app
System:
OS: macOS 10.15.5
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Browsers:
Chrome: 83.0.4103.116
Firefox: Not Found
Safari: 13.1.1
npmPackages:
react: ^16.13.1 => 16.13.1
react-dom: ^16.13.1 => 16.13.1
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Expected behavior
graphql/stringshould import fine
Actual behavior
Error: Cannot find module 'graphql/string'
Reproducible demo
git clone https://github.com/afrankel-sfdo/cra-ssr-test.git cura-import-bug; cd cura-import-bug; git reset --hard e97f641adb96f4525a577d4ea58f142d0c92ecd6; yarn; yarn start
Temporary fix
Workaround by renaming project folder. Also works fine in vanilla CRA.
git clone https://github.com/afrankel-sfdo/cra-ssr-test.git cura-import-fix; cd cura-import-fix; git reset --hard 1b7cace04e103e184bcef070a153499568703679; yarn; yarn start
Metadata
Metadata
Assignees
Labels
No labels
