Skip to content

USWDS-Site: Error writeup - uswds-core config - #1698

Merged
thisisdano merged 4 commits into
mainfrom
al-config-error
Jul 18, 2022
Merged

USWDS-Site: Error writeup - uswds-core config#1698
thisisdano merged 4 commits into
mainfrom
al-config-error

Conversation

@amyleadem

@amyleadem amyleadem commented Jul 1, 2022

Copy link
Copy Markdown
Contributor

Description

Closes #1690

Preview links:

Purpose

Update documentation surrounding the configuration of @use "uswds-core" with() to include a note about error handling. If configured improperly, users can receive an error message that might point them in the wrong direction. Adding a note to clarify what to do when receiving this error should help users get unstuck and successfully compile their .scss files.

Related error message:

Error: This module was already loaded, so it can't be configured using "with".
   ┌──> node_modules/@uswds/uswds/packages/uswds-core/src/styles/variables/_index.scss
16 │   @forward "project-defaults";
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ new load
   ╵
   ┌──> node_modules/@uswds/uswds/packages/uswds-core/src/styles/functions/general/get-default.scss
14 │   @use "../../variables/project-defaults" as *;
   │   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ original load

Relevant slack threads related to this error:

Additional information

Before you hit Submit, make sure you’ve done whichever of these applies to you:

  • Follow the 18F Front End Coding Style Guide and Accessibility Guide.
  • Run npm test and make sure the tests for the files you have changed have passed.
  • Run your code through HTML_CodeSniffer and make sure it’s error free.
  • Title your pull request using this format: [Website] - [UI component]: Brief statement describing what this pull request solves.

@amyleadem amyleadem changed the title USWDS-Site: uswds-core configuration USWDS-Site: Error writeup - uswds-core config Jul 5, 2022
@amyleadem
amyleadem marked this pull request as ready for review July 5, 2022 14:44

@mejiaj mejiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Amy!

@amyleadem
amyleadem requested a review from thisisdano July 6, 2022 13:33
@thisisdano
thisisdano merged commit 0c6de38 into main Jul 18, 2022
@thisisdano
thisisdano deleted the al-config-error branch July 18, 2022 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add note about "Error: This module was already loaded, so it can't be configured using "with"

3 participants