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

glob 8.x breaks Windows #470

Open
XhmikosR opened this issue Nov 25, 2022 · 11 comments · May be fixed by #510
Open

glob 8.x breaks Windows #470

XhmikosR opened this issue Nov 25, 2022 · 11 comments · May be fixed by #510

Comments

@XhmikosR
Copy link
Contributor

On Windows, glob 8.x has changed how results are returned and fantasticon 2.0.0 is unusable.

> bootstrap-icons@1.10.2 icons-font
> fantasticon

No SVGs found in ./icons
ERROR: "icons-font" exited with 1.

I suggest that you either downgrade glob or normalize backslashes yourself. I personally just don't update glob to 8.x.

@XhmikosR XhmikosR mentioned this issue Nov 25, 2022
@HoneyLuka
Copy link

Confirmed, I got a "No SVGs found in xxx" error on Windows.
Version: 2.0.0

@hapf
Copy link

hapf commented Jan 18, 2023

The bug is, that glob requires slashes, but path.join() creates backslashes on windows systems. In the file src/utils/assets.ts, function loadPaths(dir), create globPath as join(dir, **/*.${ASSETS_EXTENSION}).replace(/\\/g, '/'); and it should work.

@lucas-labs
Copy link

The bug is, that glob requires slashes, but path.join() creates backslashes on windows systems. In the file src/utils/assets.ts, function loadPaths(dir), create globPath as join(dir, **/*.${ASSETS_EXTENSION}).replace(/\\/g, '/'); and it should work.

I just tested this, and it fixed the issue.

sozysozbot added a commit to sozysozbot/geometric_linzklar that referenced this issue Jan 29, 2023
sozysozbot added a commit to sozysozbot/linmarn_font_project_tentative_temporary that referenced this issue Jan 31, 2023
@Mirta91
Copy link

Mirta91 commented Feb 16, 2023

The same thing is happening to me. Downgrading the version to 1.2.3 helped temporaraly.

@anabwan
Copy link

anabwan commented May 1, 2023

The bug is, that glob requires slashes, but path.join() creates backslashes on windows systems. In the file src/utils/assets.ts, function loadPaths(dir), create globPath as join(dir, **/*.${ASSETS_EXTENSION}).replace(/\\/g, '/'); and it should work.

I did the same! this works..

@sozysozbot
Copy link

For those who want to downgrade glob but are struggling to do so (I definitely was!):

  1. Add overrides to your package.json
  "dependencies": {
    "fantasticon": "^2.0.0"
+  },
+  "overrides": {
+    "fantasticon": {
+      "glob": "7.2.0"
+   }
  }
  1. run npm uninstall fantasticon && npm install fantasticon

(According to npm/cli#4232 (comment) , you need to explicitly uninstall and reinstall fantasticon for the overrides to work

@amitpatil321
Copy link

Followed same steps but still getting that error :/

@amitpatil321
Copy link

For now i downgraded it to 1.2.3, and Since I was using global instance, I just installed it globally

npm i -g fantasticon@1.2.3

@adidahiya
Copy link

For anyone encountering this bug: you can try migrating to @twbs/fantasticon instead. The bootstrap team has forked fantasticon and worked around this issue. It seems like this original fantasticon package is no longer maintained. I migrated my project 2 months ago and it's been working well so far.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Feb 2, 2024

I was really hoping we could upstream our patches, since they are mostly trivial but improve things nevertheless (comparison). Unfortunately, last time I tried upstreaming the patches, I didn't succeed so I have to keep the fork around for the time being.

sozysozbot added a commit to sozysozbot/gy1_bet2_pmcp_font that referenced this issue Feb 11, 2024
sozysozbot added a commit to AIL-MO-LETI-CEP/syt2_ten1_pmcp_font that referenced this issue Feb 11, 2024
もともとの fantasticon がメンテされなくなったので、
tancredi/fantasticon#470 (comment) にある通り引っ越すことになった
sozysozbot added a commit to sozysozbot/lin-marn-bitmap-font that referenced this issue Feb 11, 2024
sozysozbot added a commit to sozysozbot/nun1_aik2_pmcp_font that referenced this issue Feb 11, 2024
sozysozbot added a commit to sozysozbot/linzklar-mincho that referenced this issue Feb 11, 2024
sozysozbot added a commit to sozysozbot/geometric_linzklar that referenced this issue Feb 11, 2024
@ruancs
Copy link

ruancs commented Mar 19, 2024

For now i downgraded it to 1.2.3, and Since I was using global instance, I just installed it globally

npm i -g fantasticon@1.2.3

this worked to me! thanks

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

Successfully merging a pull request may close this issue.

10 participants