-
Notifications
You must be signed in to change notification settings - Fork 123
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
node-glob not finding paths on windows #130
Comments
More info here: isaacs/node-glob#467 Looks like backslashes were never explicitly supported but worked in v7 of node-glob (no longer in v8). |
Sqrrl
added a commit
that referenced
this issue
Dec 16, 2022
Thanks for reporting and sorry for the delay. I've added your proposed fix with v2.8.1. Would be great if you could check it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attempting to use the plugin with Storybook 6.5.9 on Windows and it fails silently by not showing any tokens in the panel or via the doc blocks.
On debugging, it's clear that the
glob.sync
is returning an empty array in plugin.jsgetTokenFilePaths()
.The path is joined onto the context which, on windows, has back slashes:
C:\repos\design-tokens
and ends up asC:\repos\design-tokens\**\*.css
before being passed to glob.sync, which only supports POSIX paths.If I replace backslashes slashes after joining the strings with path.join(), it works fine.
const paths = glob.sync(path.replace(/\\/g, '/'));
It works fine for me using the webpack5 demo from this repo (earlier version of storybook).
From a quick google, it looks like the node-glob package has always worked like this so I'm not sure why it's breaking now.
The text was updated successfully, but these errors were encountered: