Workflow of git action throw error while we setup `type:module` on package.json
hyperse-net opened this issue · 2 comments
hyperse-net commented
Run changesets/action@v1
changing directory to the one given as the input
setting git user
/usr/bin/git config user.name "github-actions[bot]"
/usr/bin/git config user.email "github-actions[bot]@users.noreply.github.com"
setting GitHub credentials
/usr/bin/git checkout changeset-release/main
error: pathspec 'changeset-release/main' did not match any file(s) known to git
/usr/bin/git checkout -b changeset-release/main
Switched to a new branch 'changeset-release/main'
/usr/bin/git reset --hard f2f1e495371753d77755a5f186d30166ef718c7f
HEAD is now at f2f1e49 fix: fix ci
/opt/hostedtoolcache/node/18.18.2/x64/bin/node /home/runner/work/tailwind-layer/tailwind-layer/node_modules/@changesets/cli/bin.js version
/home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/src/style.js:7
const stripAnsi = require("strip-ansi")
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/tailwind-layer/tailwind-layer/node_modules/strip-ansi/index.js from /home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/src/style.js not supported.
Instead change the require of index.js in /home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/src/style.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/src/style.js:7:19)
at Object.<anonymous> (/home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/src/render.js:1:15)
at Object.<anonymous> (/home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/src/factory.js:2:16)
at Object.<anonymous> (/home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/adapters/default-adapter.js:1:17)
at Object.<anonymous> (/home/runner/work/tailwind-layer/tailwind-layer/node_modules/tty-table/src/main.js:7:20)
at Object.<anonymous> (/home/runner/work/tailwind-layer/tailwind-layer/node_modules/@changesets/cli/dist/changesets-cli.cjs.js:33:[13](https://github.com/hyperse-io/tailwind-layer/actions/runs/7055670559/job/19206464870#step:6:14))
at Object.<anonymous> (/home/runner/work/tailwind-layer/tailwind-layer/node_modules/@changesets/cli/bin.js:4:1) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v[18](https://github.com/hyperse-io/tailwind-layer/actions/runs/7055670559/job/19206464870#step:6:19).18.2
Error: Error: The process '/opt/hostedtoolcache/node/18.18.2/x64/bin/node' failed with exit code 1
Error: The process '/opt/hostedtoolcache/node/18.18.2/x64/bin/node' failed with exit code 1
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
cwd: ${{ github.workspace }}
title: '[Release] Version packages'
Andarist commented
Do you use by any chance some Yarn resolutions or similar?
hyperse-net commented
i just upgrade yarn 4.0.2 it works :)