🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Error deploying Sanity.io with Github action

1 replies
Last updated: Feb 22, 2023
Another day, another call for help from me.I’m using the
Github action for Sanity.io to deploy using the example workflow, but receive the following error:
The `sanity` module is not installed in current project
Project-specific commands not available until you run `yarn install`
Running 'yarn install'
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
error @ixda-services/ixda-web@1.0.0-alpha: The engine "node" is incompatible with this module. Expected version "^16". Got "14.21.3"
On local dev I run node v16, and it works well.
Feb 22, 2023, 1:35 PM
Well, I dropped relying on the plugin alltogether, and got it working after changing my github action script to this:
name: Deploy Sanity
on:
  push:
    branches: [main]
jobs:
  sanity-deploy:
    runs-on: ubuntu-18.04
    name: Deploy Sanity
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Install dependencies
        run: yarn install
      - name: Deploy Sanity Studio
        run: |
          cd studio
          npx @sanity/cli deploy
        env:
          SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
Feb 22, 2023, 2:12 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?