You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
current version of create-react-app: 5.0.0
running from C:\Users\Lagicrus\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app
System:
OS: Windows 10 10.0.22000
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600K
Binaries:
Node: 16.13.0 - E:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.1.0 - E:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.22000.120.0), Chromium (98.0.1108.62)
Internet Explorer: 11.0.22000.120
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 5.0.0 => 5.0.0
npmGlobalPackages:
create-react-app: Not Found
(I do have Chrome, this just can't find it weirdly)
Steps to reproduce
Create a fresh CRA repo
Rename App.css to App.module.css
Replace import 'App.css'; in App.js with import {test} from "./App.module.css";
Get error in browser
Expected behavior
To be able to import only the styles I need from a file and not the entire thing.
To not have to import styles and then deconstruct it on the next line which is verbosity for the sake of it.
Describe the bug
In react scripts 4.0.3 and earlier you were able to do
But now when you do the same you get
export 'app' (imported as 'app') was not found in './App.module.css' (possible exports: default)
This can also be seen in https://blog.logrocket.com/a-deep-dive-into-css-modules/ and their repo @ https://github.com/lawrenceagles/css-module-demo
Did you try recovering your dependencies?
8.1.0 & no as this is a fresh install
Environment
Environment Info:
current version of create-react-app: 5.0.0
running from C:\Users\Lagicrus\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app
System:
OS: Windows 10 10.0.22000
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600K
Binaries:
Node: 16.13.0 - E:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.1.0 - E:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.22000.120.0), Chromium (98.0.1108.62)
Internet Explorer: 11.0.22000.120
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 5.0.0 => 5.0.0
npmGlobalPackages:
create-react-app: Not Found
(I do have Chrome, this just can't find it weirdly)
Steps to reproduce
App.css
toApp.module.css
import 'App.css';
in App.js withimport {test} from "./App.module.css"
;Expected behavior
To be able to import only the styles I need from a file and not the entire thing.
To not have to import
styles
and then deconstruct it on the next line which is verbosity for the sake of it.Actual behavior
DEMO
https://github.com/Lagicrus/cra-bug12096
The text was updated successfully, but these errors were encountered: