Skip to content

USWDS-Compile - Bug: Build Fails Out of the Box #151

Description

@bronzehedwick

Describe the bug

When following the standard USWDS/Compile setup instructions, the build fails.

Steps to reproduce the bug

  1. mkdir test-project
  2. cd test-project
  3. mkdir sass
  4. echo "@forward 'uswds-theme';" > sass/main.scss
  5. npm init -y
  6. npm install --save @uswds/uswds@latest
  7. npm install @uswds/compile --save-dev
  8. Create gulpfile.js with the following contents.
    const uswds = require("@uswds/compile");
    uswds.settings.version = 3;
    exports.compile = uswds.compile;
  9. npx gulp compile
  10. Notice the build fails with an error similar to the one below.
[13:57:42] Using gulpfile /path/to/test-project/gulpfile.js
[13:57:42] Starting 'compile'...
[13:57:42] Starting 'logVersion'...
uswds.version: 3
[13:57:42] Finished 'logVersion' after 506 μs
[13:57:42] Starting 'buildSass'...
Compiling with USWDS 3.12.0
[13:57:42] Starting 'buildSprite'...
[13:57:42] 'buildSprite' errored after 5.2 ms
[13:57:42] Error: ENOENT: no such file or directory, scandir '/path/to/test-project/assets/uswds/img/usa-icons'
[13:57:42] 'compile' errored after 12 ms

Expected Behavior

The build finishes without error, along with the compiled result of the imported SASS.

Related code

No response

Screenshots

No response

System setup

Install Node.js.

Additional context

No response

Code of Conduct

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions