Open devlocalhost opened 4 months ago
@devlocalhost There was an internal error within cbmp v1.1.0. I updated cbmp and patched it in this repository b71d807ecc7362b0e1470fa715a24dd1ba83f929.
const stringWidth = require('string-width'); ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/string-width/index.js from /home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/cliui/build/index.cjs not supported. Instead change the require of index.js in /home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules. at Object.
(/home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/cliui/build/index.cjs:291:21) at Object. (/home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/yargs/build/index.cjs:1:60678) { code: 'ERR_REQUIRE_ESM' }
I also encountered the same error that you reported during development. I was able to fix it by removing yarn.lock
and node_modules
, and then running yarn install
.
rm -rf node_modules yarn.lock
git pull
yarn install
yarn generate
tried those commands you sent, it still fails
output:
Bibata_Cursor # 03:52:25 PM
> rm -rf node_modules yarn.lock
git pull
yarn install
yarn generate
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), 529 bytes | 66.00 KiB/s, done.
From https://github.com/ful1e5/Bibata_Cursor
407f9299..b71d807e main -> origin/main
Updating 407f9299..b71d807e
Fast-forward
package.json | 2 +-
yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["string-width@^4.2.3"] is trying to unpack in the same destination "/home/dev64/.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["strip-ansi@^6.0.1"] is trying to unpack in the same destination "/home/dev64/.cache/yarn/v6/npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity/node_modules/strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "/home/dev64/.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["strip-ansi@^6.0.0"] is trying to unpack in the same destination "/home/dev64/.cache/yarn/v6/npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity/node_modules/strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["string-width@^4.2.0"] is trying to unpack in the same destination "/home/dev64/.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "/home/dev64/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs" as pattern ["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 34.13s.
yarn run v1.22.19
$ npx cbmp render.json && bash build.sh
/home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/cliui/build/index.cjs:291
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/string-width/index.js from /home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/cliui/build/index.cjs:291:21)
at Object.<anonymous> (/home/dev64/Documents/git-stuff/Bibata_Cursor/node_modules/yargs/build/index.cjs:1:60678) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.19.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
steps:
output: