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

chore/upgrade greenwood v0.31.0 #299

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Dec 28, 2024

Related Issue

ProjectEvergreen/greenwood#1328

Summary of Changes

  1. Upgrade Greenwood v0.31.0
  2. Needed optional dependency
         Running Greenwood with the build command.
         Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
             at requireWithFriendlyError (/home/runner/work/www.thegreenhouse.io/www.thegreenhouse.io/node_modules/@greenwood/cli/node_modules/rollup/dist/native.js:64:9)
             at Object. (/home/runner/work/www.thegreenhouse.io/www.thegreenhouse.io/node_modules/@greenwood/cli/node_modules/rollup/dist/native.js:73:76)
             ... 3 lines matching cause stack trace ...
             at Module._load (node:internal/modules/cjs/loader:1019:12)
             at ModuleWrap. (node:internal/modules/esm/translators:[20](https://github.com/thegreenhouseio/www.thegreenhouse.io/actions/runs/12530140517/job/34946406088#step:8:21)3:29)
             at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
             at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
             at async run (file:///home/runner/work/www.thegreenhouse.io/www.thegreenhouse.io/node_modules/@greenwood/cli/src/index.js:67:16) {
           [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
           Require stack:
           - /home/runner/work/www.thegreenhouse.io/www.thegreenhouse.io/node_modules/@greenwood/cli/node_modules/rollup/dist/native.js
               at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
               at Module._load (node:internal/modules/cjs/loader:981:27)
               at Module.require (node:internal/modules/cjs/loader:1231:19)
               at require (node:internal/modules/helpers:177:18)
               at requireWithFriendlyError (/home/runner/work/www.thegreenhouse.io/www.thegreenhouse.io/node_modules/@greenwood/cli/node_modules/rollup/dist/native.js:46:10)
               at Object. (/home/runner/work/www.thegreenhouse.io/www.thegreenhouse.io/node_modules/@greenwood/cli/node_modules/rollup/dist/native.js:73:76)
               at Module._compile (node:internal/modules/cjs/loader:1364:14)
               at Module._extensions..js (node:internal/modules/cjs/loader:14[22](https://github.com/thegreenhouseio/www.thegreenhouse.io/actions/runs/12530140517/job/34946406088#step:8:23):10)
               at Module.load (node:internal/modules/cjs/loader:1203:32)
               at Module._load (node:internal/modules/cjs/loader:1019:12) {
             code: 'MODULE_NOT_FOUND',
             requireStack: [
               '/home/runner/work/www.thegreenhouse.io/www.thegreenhouse.io/node_modules/@greenwood/cli/node_modules/rollup/dist/native.js'
             ]
           }
         }
         Error: Process completed with exit code 1.
       

TODO

  1. Getting this message - meh, just a Puppeteer thing

    Unable to locate /assets/banner.270294678.jpg. You may need to manually copy this file from its source location to the build output directory.

  2. Stylelint <> PostCSS not working
    Error: Cannot find module 'postcss'
      Require stack:
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint-a11y/dist/rules/media-prefers-reduced-motion/index.js
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint-a11y/dist/rules/index.js
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint-a11y/dist/index.js
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint/lib/augmentConfig.js
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint/lib/createStylelint.js
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint/lib/printConfig.js
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint/lib/cli.js
      - /Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint/bin/stylelint.js
          at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
          at Module._load (node:internal/modules/cjs/loader:841:27)
          at Module.require (node:internal/modules/cjs/loader:1061:19)
          at require (/Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
          at Object.<anonymous> (/Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/stylelint-a11y/dist/rules/media-prefers-reduced-motion/index.js:80:16)
          at Module._compile (/Users/owenbuckley/Workspace/contributarycommunity/www.contributary.community/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
          at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
          at Module.load (node:internal/modules/cjs/loader:1037:32)
          at Module._load (node:internal/modules/cjs/loader:878:12)
          at Module.require (node:internal/modules/cjs/loader:1061:19)
      error Command failed with exit code 1.
      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    
  3. Looks like Lit v2 does not play well with modern import / export map generation and bundling? Not sure if we should just upgrade to v3?
  4. So Lit v3 work in development, but breaks when prerendering for production...maybe the end of the line? - chore/upgrade greenwood v0.31.0 #299
    Screenshot 2024-12-28 at 5 29 42 PM

@thescientist13 thescientist13 added question Further information is requested chore build stuff, deploy stuff, etc etc needs upstream Dependent on work / features from Greenwood labels Dec 28, 2024
@thescientist13 thescientist13 self-assigned this Dec 28, 2024
@thescientist13
Copy link
Member Author

Observed issues upgrading to Lit v3 + SSR (in production)

NO BLOG POSTS

Screenshot 2024-12-28 at 7 32 23 PM

Google Analytics / Components are not SSR safe

Screenshot 2024-12-28 at 7 34 35 PM

const hashSelection = typeof window !== 'undefined'
  ? window.location.hash.replace('#', '').toUpperCase()
  : '';

GraphQL Double Import Map (about page)

Screenshot 2024-12-28 at 7 31 56 PM
Screenshot 2024-12-28 at 7 35 27 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore build stuff, deploy stuff, etc etc needs upstream Dependent on work / features from Greenwood question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant