Closed sstruemph closed 2 weeks ago
Re: tailwind config updates -
@sstruemph This worked for me, but I had to change the configuration of my machine. Below is an overview of what I discovered and the steps I needed to take before this update worked.
I'd like to have @EugeneKyale and @stonetim test in their locals to see if they experience a similar issue. Adding some dev notes in the readme may be worth it.
After updating locally, I attempted to run the yarn
command but was met with an error that my version of yarn didn't meet the minimum requirement. This was accurate, but took me a bit to figure out the issue. I had installed node and yarn using homebrew, but the highest version of yarn homebrew supports is 1.22.22.
This led me to review the official Yarn docs and discover the following.
You may notice by reading our installation guide that we don't tell you to
run npm install -g yarn
to install Yarn - we even recommend against it. source
I attempted to install using their recommended method, only to discover that the homebrew package of node doesn't include corepack.
To fix this, I had to remove yarn and node from Homebrew using brew uninstall --force yarn
and brew uninstall --force node
. Then reinstall using the following steps.
nvm install 22
.corepack enable
. I may have had to use sudo corepack enable
this.
yarn -v
to confirm that v1.22.22 was installed.yarn set version stable
.
yarn -v
to confirm that v4.4.1 was installed.This is working as expected now. Did you run into anything like this during your testing?
@sstruemph This worked for me, but I had to change the configuration of my machine. Below is an overview of what I discovered and the steps I needed to take before this update worked.
I'd like to have @EugeneKyale and @stonetim test in their locals to see if they experience a similar issue. Adding some dev notes in the readme may be worth it.
After updating locally, I attempted to run the
yarn
command but was met with an error that my version of yarn didn't meet the minimum requirement. This was accurate, but took me a bit to figure out the issue. I had installed node and yarn using homebrew, but the highest version of yarn homebrew supports is 1.22.22.This led me to review the official Yarn docs and discover the following.
You may notice by reading our installation guide that we don't tell you to
run npm install -g yarn
to install Yarn - we even recommend against it. sourceI attempted to install using their recommended method, only to discover that the homebrew package of node doesn't include corepack.
To fix this, I had to remove yarn and node from Homebrew using
brew uninstall --force yarn
andbrew uninstall --force node
. Then reinstall using the following steps.
- Install nvm.
- VERY IMPORTANT! Close and reopen the terminal window.
- Install node using
nvm install 22
.Enable corepack using
corepack enable
. I may have had to usesudo corepack enable
this.
- I was prompted to install yarn v1.22.22 and selected yes.
- Ran
yarn -v
to confirm that v1.22.22 was installed.Upgrade yarn to 4.4.1 using
yarn set version stable
.
- Ran
yarn -v
to confirm that v4.4.1 was installed.This is working as expected now. Did you run into anything like this during your testing?
@unscripted @sstruemph I encountered some issues when trying to build the project locally, but I was eventually able to resolve them. Initially, when I attempted to run the build, I encountered the following errors:
error kindling@2.0.0: The engine "node" is incompatible with this module. Expected version ">=18.12.0". Got "16.6.1"
error kindling@2.0.0: The engine "yarn" is incompatible with this module. Expected version ">=4.22.22". Got "1.22.17"
error Commands cannot run with an incompatible environment.
These errors indicated that my local environment was not aligned with the required Node.js and Yarn versions specified by the project.
To fix the issue, here are the steps I followed:
nvm use 20.0.0 && npm uninstall -g yarn
corepack enable
corepack prepare yarn@stable --activate
yarn --version
nvm use 20.0.0 && yarn install
nvm use 20.0.0 && yarn build
After following these steps, the build process completed successfully.
@EugeneKyale @unscripted I started a slack thread but maybe we should discuss it here instead?
Thank you both for testing this! It seems that Yarn is adding a few additional steps versus what we would have with NPM. In the past I have always used NPM on dev projects and that would be my preference.
Changes proposed in this pull request
This PR updates @wordpress/scripts to version 26.
Details
node
bumped to >=20.10.0yarn
bumped to >=4.4.1wordpress/scripts
updated to 26.4.0. The accompanying packages have been updated usingpackages-update
image-webpack-loader
package and the custom webpack rules have been removedPackages added with wordpress/scripts update
Resolutions were added for Yarn in the package.json file. The resolutions field allows you to specify exact versions of packages that you want to enforce across the entire dependency tree. This means that even if different packages request different versions of the same dependency, the version you specify in resolutions will be used instead.
In
tailwind.config.cjs
thecontent
items are more specific to exclude node_modules and satisfies an error encountered during testing.yarn.lock
is updated.References to a past project removed from
.env.sample
.NOTE: During the build you might see the following messages. They can be ignored.
Closes https://app.asana.com/0/1203895219649773/1208159906836440/f
Pre-submit checklist
As the author of this pull request, I verify that:
master
.Testing
How to test the changes in this pull request
Follow the steps below to test the changes in this PR.
Code review
As the code reviewer for this pull request, I verify that:
Once testing is complete, notify the author of any failed tests and move the task to "Kick back" in Asana or continue with the "merging" steps below.
Merging
As the individual merging this pull request, I verify that: