Having an issue with latest Sage 10 set up running yarn build. I am running it locally on Lima inside Trellis setup. Did a fresh addition of the theme using
yarn
yarn install v1.22.22
[1/5] π Validating package.json...
[2/5] π Resolving packages...
[3/5] π Fetching packages...
[4/5] π Linking dependencies...
warning "@roots/bud > @roots/bud-support > remark-loader@5.0.0" has incorrect peer dependency "remark@^14.0.0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react@7.23.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-display-name@7.23.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx@7.23.4" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx-development@7.22.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-pure-annotations@7.23.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.23.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx-development > @babel/plugin-transform-react-jsx@7.22.15" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx-development > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.22.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] π¨ Building fresh packages...
β¨ Done in 7.32s.
so had warnings already. But then on yarn build I got stuck:
yarn build
yarn run v1.22.22
$ bud build
(node:76623) ExperimentalWarning: CommonJS module /Users/user/code/site.com/site/web/app/themes/nynaeve/node_modules/tailwindcss/lib/lib/load-config.js is loading ES Module /Users/user/code/site.com/site/web/app/themes/nynaeve/tailwind.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
β sage [7c5a3ee7e664393f] ./public
β
β β Unexpected end of JSON input
β
β° 1 error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Pinned Node to version 22 using Volta thinking it may work better than using latest 23 version
user@mbp ξ° ~/code/site.com/site/web/app/themes/nynaeve ξ° volta list
β‘οΈ Currently active tools:
Node: v22.11.0 (current @ /Users/user/code/site.com/site/web/app/themes/nynaeve/
package.json)
Yarn: v4.5.0 (default)
Tool binaries available: NONE
See options for more detailed reports by running `volta list --help`.
but still having that error now. Also tried dev-main with Bud 6.23.3:
yarn
yarn install v1.22.22
[1/5] π Validating package.json...
[2/5] π Resolving packages...
[3/5] π Fetching packages...
[4/5] π Linking dependencies...
warning "@roots/bud > @roots/bud-support > remark-loader@6.0.0" has incorrect peer dependency "remark@^14.0.0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react@7.24.7" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-display-name@7.24.7" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx@7.25.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx-development@7.24.7" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-pure-annotations@7.24.7" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@roots/sage > @roots/bud-preset-wordpress > @roots/bud-react > @babel/preset-react > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.24.7" has unmet peer dependency "@babel/core@^7.0.0-0".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] π¨ Building fresh packages...
β¨ Done in 51.14s.
and on build
yarn build
yarn run v1.22.22
$ bud build
(node:98103) ExperimentalWarning: CommonJS module /Users/user/code/site.com/site/web/app/themes/nynaeve/node_modules/tailwindcss/lib/lib/load-config.js is loading ES Module /Users/user/code/site.com/site/web/app/themes/nynaeve/tailwind.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
β sage [4da110b6d1041ccc] ./public
β
β β Unexpected end of JSON input
β
β° 1 error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Thanks for checking. I realized I had installed nvm as well the other day for management not realizing I could just as well do that with Volta. And also when order in .zshrc is off this can cause issues. So I just did
yarn
β€ YN0087: Migrated your project to the latest Yarn version π
β€ YN0000: Β· Yarn 4.5.0
β€ YN0000: β Resolution step
β€ YN0085: β + @roots/bud-tailwindcss@npm:6.23.3, @roots/bud@npm:6.23.3, @roots/sage@npm:6.23.3, @alcalzone/ansi-tokenize@npm:0.1.3, @alloc/quick-lru@npm:5.2.0, and 892 more.
β€ YN0000: β Completed in 9s 387ms
β€ YN0000: β Post-resolution validation
β€ YN0086: β Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
β€ YN0000: β Completed
β€ YN0000: β Fetch step
β€ YN0013: β 45 packages were added to the project (+ 56.16 MiB).
β€ YN0000: β Completed in 14s 211ms
β€ YN0000: β Link step
β€ YN0007: β @roots/bud-framework@npm:6.23.3 must be built because it never has been before or the last one failed
β€ YN0007: β @swc/core@npm:1.7.2 [e7bb3] must be built because it never has been before or the last one failed
β€ YN0007: β core-js-pure@npm:3.26.1 must be built because it never has been before or the last one failed
β€ YN0000: β Completed in 8s 831ms
β€ YN0000: Β· Done with warnings in 32s 520ms
user@mbp ξ° ~/code/site.com/site/web/app/themes/nynaeve ξ° yarn build
β sage [f7efd2aff6dcda05] ./public
β
β app
β β js/runtime.c39a01.js β 1.18 kB
β β css/app.53672d.css β 7.03 kB
β β js/app.f11475.js β 349 bytes
β
β editor
β β js/runtime.c39a01.js β 1.18 kB
β β css/editor.ef46db.css β ΓΈ
β β js/editor.1a8d02.js β 1.66 kB
β
β° 1s 284ms 8 modules [0/8 modules cached]
And when I checked Volta in installed theme with pinned version all seems well
volta list
β‘οΈ Currently active tools:
Node: v22.11.0 (default)
Yarn: v4.5.0 (default)
Tool binaries available: NONE
See options for more detailed reports by running `volta list --help`.