Skip to content
New issue

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

Local site is unstyled / style module not found #3818

Closed
4 tasks
beechnut opened this issue Apr 11, 2024 · 2 comments · Fixed by #3836
Closed
4 tasks

Local site is unstyled / style module not found #3818

beechnut opened this issue Apr 11, 2024 · 2 comments · Fixed by #3836
Labels

Comments

@beechnut
Copy link
Contributor

beechnut commented Apr 11, 2024

Expected Behavior

Following the setup steps should result in a working, styled 18F site.
Screenshot 2024-04-11 at 1 53 43 PM

Actual Behavior

Following the setup steps results in a non-styled 18F site. NPM reports "module not found" errors, included below in Error log. I'm also seeing that it's overwriting the lockfileVersion from 2 to 1.

Screenshot 2024-04-11 at 1 53 45 PM

Steps to reproduce the behavior

With macOS 13.6.4 (Ventura), Ruby 2.3.2, npm 6.13.4, node 10.19.0:

This issue is done when

  • Visiting the local site shows a correctly styled site
  • NPM version is specified (if important / relevant to the fix)

Error log:

→  ./serve

> [email protected] uswds-build /Users/username/code/not-project/18f.gsa.gov
> npm run uswds-copy-assets && npm run uswds-compile


> [email protected] uswds-copy-assets /Users/username/code/not-project/18f.gsa.gov
> npx gulp copyAssets

{ Error: Cannot find module 'csso/syntax'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/Users/username/code/not-project/18f.gsa.gov/node_modules/postcss-csso/cjs/index.cjs:3:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] uswds-copy-assets: `npx gulp copyAssets`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] uswds-copy-assets script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2024-04-11T17_52_30_340Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] uswds-build: `npm run uswds-copy-assets && npm run uswds-compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] uswds-build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2024-04-11T17_52_30_372Z-debug.log

> [email protected] uswds-watch /Users/username/code/not-project/18f.gsa.gov
> npx gulp watch

{ Error: Cannot find module 'csso/syntax'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/Users/username/code/not-project/18f.gsa.gov/node_modules/postcss-csso/cjs/index.cjs:3:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] uswds-watch: `npx gulp watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] uswds-watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2024-04-11T17_52_31_336Z-debug.log
⚠️   1
@beechnut
Copy link
Contributor Author

Ok, after installing the latest Node (v 21.7.3) and NPM (10.5.2), the blog is styled correctly and no longer missing style files.

It looks like lockfileVersion 2 started with Node 7, so I'm guessing we have a minimum Node version that we're not specifying.

@adunkman
Copy link
Member

For this ticket, we should specify the minimum node version needed for lockfileVersion 2, and close the issue until it reoccurs (assuming that is the fix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants