Closed tyler36 closed 10 months ago
I tried the changes you suggests but I am still getting errors. My javascript skills are limited to frontend frameworks so dynamic imports and ES modules are a little over my head.
Thanks.
Ah, textlint-scripts
has a issue.
We want to preserve import()
, but it will transpile to require()
function.
I've created an issue to upstream https://github.com/textlint/textlint/issues/1283
Edit: fixed in https://github.com/textlint/textlint/releases/tag/v13.4.0
Probably need to run following command.
package.json
now includes textlint-scripts
so I not sure if we need it.
Now getting error:
Still get ERR_REQUIRE_ESM
error when testing locally.
package.json
now includestextlint-scripts
so I not sure if we need it.
Yes, It is required. We need to update to v13.4.0.
Still get
ERR_REQUIRE_ESM
error when testing locally.
https://github.com/textlint/textlint/releases/tag/v13.4.0 fix this issue.
yarn add textlint-scripts --dev
yarn upgrade
https://github.com/textlint-rule/textlint-rule-alex/actions/runs/6795156695/job/18472756945?pr=25
/home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/cliui/build/index.cjs:293 const wrap = require('wrap-ansi'); ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/wrap-ansi/index.js from /home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/cliui/build/index.cjs not supported. Instead change the require of index.js in /home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules. at Object.
(/home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/cliui/build/index.cjs:293:14) at Object. (/home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/yargs/build/index.cjs:2861:12) at Object. (/home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/yargs/yargs:3:69) at Object. (/home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/mocha/lib/cli/cli.js:15:15) at Object. (/home/runner/work/textlint-rule-alex/textlint-rule-alex/node_modules/mocha/bin/mocha.js:141:3) { code: 'ERR_REQUIRE_ESM' }
This error caused by old wrap-ansi
package.
It will be resolved by run yarn upgrade
and commit updated yarn.lock
.
๐ yarn upgrade
will update the version referenced by the lock file to the latest in the range of semver.
Hmmm ... tests passed at e27b51904d61be6ab5384877374917bf36441589.
Hmmm ... tests passed at e27b519.
Yes. This workflow includes yarn upgrade
before running tests.
Committing the update to yarn.lock will solve the problem.
yarn upgrade
git add yarn.lock
git commit
Fmm. its something wrong.
I've fixed in https://github.com/textlint-rule/textlint-rule-alex/pull/25/commits/9f7a8f73f8cec06701ff5bdf6619b2775f6a4fdb
resolutions
field fix version forcely.
CI is passed ๐
https://github.com/textlint-rule/textlint-rule-alex/commit/9f7a8f73f8cec06701ff5bdf6619b2775f6a4fdb fixes local testing for me too.
Yay! ๐
Thank you very much for your help, guidence and patience.
4.0.0 is released ๐ https://github.com/textlint-rule/textlint-rule-alex/releases/tag/v4.0.0
4.0.0
fixes "Got allows a redirect to a UNIX socket" dependable alert.
Fixes #17
This PR bumps the dependencies required to prevent Dependabot notifications.