github-action-sanity
github-action-sanity copied to clipboard
Incompatible Node.js Version in Sanity CLI Installation
Issue Summary:
When attempting to install @sanity/cli globally using yarn global add @sanity/cli, the process fails due to an incompatible Node.js version.
Steps to Reproduce:
- Use a Dockerfile that includes the following line:
RUN yarn global add @sanity/cli - Run the Docker build process using Node.js 18.
- The build fails with the following error message:
error @sanity/[email protected]: The engine "node" is incompatible with this module. Expected version ">=20.11.0". Got "18.20.7" - The process exits with code 1, preventing the build from completing successfully.
Expected Behavior:
The @sanity/cli should be installed without errors when running yarn global add @sanity/cli.
Actual Behavior: The installation fails due to an incompatible Node.js version requirement, as the installed Node.js version (18.20.7) does not meet the minimum required version (>=20.11.0).
Environment Details:
- Node.js Version: 18.20.7
- Sanity CLI Version: @sanity/[email protected]
- Yarn Version: 1.22.22
- Docker Base Image: node:18
Possible Solution:
- Upgrade the Node.js version in the Dockerfile to meet the required version (>=20.11.0). Example:
FROM node:20 - Use
nvmor similar tools to install and use a compatible Node.js version before installing@sanity/cli.
Additional Information: This issue prevents automated builds and deployments relying on Docker and Sanity CLI. Updating the base image to Node.js 20 should resolve the compatibility issue.
Action Required:
- Confirm the required Node.js version in Sanity's documentation.
- Update dependencies or provide compatibility notes in the installation guides.
- Consider a more descriptive error message guiding users on how to resolve the issue.
I'm also having the same issue.
Following up on this. Would be nice to update this. The action is not working at this point. 😊
released in v0.8-alpha