Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow of git action throw error while we setup type:module on package.json #339

Closed
hyperse-net opened this issue Dec 1, 2023 · 2 comments

Comments

@hyperse-net
Copy link

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
Copy link
Member

Andarist commented Dec 1, 2023

Do you use by any chance some Yarn resolutions or similar?

@hyperse-net
Copy link
Author

i just upgrade yarn 4.0.2 it works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants