ful1e5 / Bibata_Cursor

Open source, compact, and material designed cursor set.
https://www.bibata.live
GNU General Public License v3.0
1.77k stars 70 forks source link

cannot build from source - command fails #162

Open devlocalhost opened 4 months ago

devlocalhost commented 4 months ago

steps:

  1. git cloned the repo
  2. cd
  3. yarn install
  4. yarn generate (fails here)

output:

git-stuff # 06:07:02 PM
 > git clone https://github.com/ful1e5/Bibata_Cursor
Cloning into 'Bibata_Cursor'...
remote: Enumerating objects: 26501, done.
remote: Counting objects: 100% (940/940), done.
remote: Compressing objects: 100% (322/322), done.
remote: Total 26501 (delta 644), reused 622 (delta 617), pack-reused 25561
Receiving objects: 100% (26501/26501), 131.35 MiB | 1.94 MiB/s, done.
Resolving deltas: 100% (6304/6304), done.
git-stuff # 06:08:13 PM
 > cd Bibata_Cursor/
Bibata_Cursor # 06:08:18 PM
 > yarn install
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 9.86s.
Bibata_Cursor # 06:08:36 PM
 > yarn generate
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.
ful1e5 commented 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
devlocalhost commented 4 months ago

tried those commands you sent, it still fails

output: image

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.