We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
When importing Sass partials one must use @import and not @use as the docs suggest.
yes. npm version = 8.4.1
'use import sass partial'
current version of create-react-app: 5.0.0 running from /Users/alexkio/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app
System: OS: macOS 12.2 CPU: (10) x64 Apple M1 Pro Binaries: Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v14.16.0/bin/yarn npm: 8.4.1 - ~/.nvm/versions/node/v14.16.0/bin/npm Browsers: Chrome: 98.0.4758.80 Edge: Not Found Firefox: Not Found Safari: 15.3 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
$grey-dark: #282c34;
@use './_variables.scss';
background-color: #282c34;
background-color: $grey-dark;
npm start should load without errors
Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Undefined variable. ╷ 19 │ background-color: $grey-dark;
Project that fails to build using npm start and @use as suggested in the docs
Project that builds using npm start and @import
The text was updated successfully, but these errors were encountered:
Found a solution for using @use based off Sass documentation.
@use './variables' background-color: variables.$grey-dark;
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When importing Sass partials one must use @import and not @use as the docs suggest.
Did you try recovering your dependencies?
yes. npm version = 8.4.1
Which terms did you search for in User Guide?
'use import sass partial'
Environment
current version of create-react-app: 5.0.0
running from /Users/alexkio/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app
System:
OS: macOS 12.2
CPU: (10) x64 Apple M1 Pro
Binaries:
Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v14.16.0/bin/yarn
npm: 8.4.1 - ~/.nvm/versions/node/v14.16.0/bin/npm
Browsers:
Chrome: 98.0.4758.80
Edge: Not Found
Firefox: Not Found
Safari: 15.3
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
Steps to reproduce
$grey-dark: #282c34;
@use './_variables.scss';
and changebackground-color: #282c34;
tobackground-color: $grey-dark;
Expected behavior
npm start should load without errors
Actual behavior
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined variable.
╷
19 │ background-color: $grey-dark;
Reproducible demo
Project that fails to build using npm start and @use as suggested in the docs
Project that builds using npm start and @import
The text was updated successfully, but these errors were encountered: