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

Upgraded to 0.7.1 and it broke #16

Closed
hermanc-fda opened this issue Apr 5, 2020 · 12 comments
Closed

Upgraded to 0.7.1 and it broke #16

hermanc-fda opened this issue Apr 5, 2020 · 12 comments
Labels
bug Something isn't working

Comments

@hermanc-fda
Copy link

ERROR in /xxx/node_modules/storybook-design-token/dist/components/TokenOverview.js
Module not found: Error: [CaseSensitivePathsPlugin] /xxx/node_modules/storybook-design-token/dist/components/presenter/TokenPresenter.js does not match the corresponding path on disk Presenter.
@ /xxx/node_modules/storybook-design-token/dist/components/TokenOverview.js 15:23-60

And a few other similar errors. I'm going to downgrade back to 0.5.1 now.

@Sqrrl
Copy link
Collaborator

Sqrrl commented Apr 5, 2020

Hey, I renamed some stuff recently. Looks like a case sensitivity problem with the repo and git. What OS are you using?

@Sqrrl
Copy link
Collaborator

Sqrrl commented Apr 5, 2020

Just released v0.7.2 that should fix the issue. Would be great if you could verify. Sorry for the hassle.

@hermanc-fda
Copy link
Author

No prob, lemme try now. Mac OS Catalina. No need to apologize - I paid you nothing for it :)

@hermanc-fda
Copy link
Author

hmmm same problem; also get a similar error (I got this error before too):

ERROR in /xxx/node_modules/storybook-design-token/dist/components/HardCodedValuesTable.js
Module not found: Error: [CaseSensitivePathsPlugin] /xxx/node_modules/storybook-design-token/dist/components/primitives/Card.js does not match the corresponding path on disk Primitives.
@ /xxx/node_modules/storybook-design-token/dist/components/HardCodedValuesTable.js 4:13-41

ERROR in /xxx/node_modules/storybook-design-token/dist/components/TokenOverview.js
Module not found: Error: [CaseSensitivePathsPlugin] /xxx/node_modules/storybook-design-token/dist/components/primitives/Card.js does not match the corresponding path on disk Primitives.
@ /xxx/node_modules/storybook-design-token/dist/components/TokenOverview.js 16:13-41

ERROR in /xxx/node_modules/storybook-design-token/dist/components/HardCodedValuesTable.js
Module not found: Error: [CaseSensitivePathsPlugin] /xxx/node_modules/storybook-design-token/dist/components/primitives/Collapsible.js does not match the corresponding path on disk Primitives.
@ /xxx/node_modules/storybook-design-token/dist/components/HardCodedValuesTable.js 5:20-55

ERROR in /xxx/node_modules/storybook-design-token/dist/components/TokenOverview.js
Module not found: Error: [CaseSensitivePathsPlugin] /xxx/node_modules/storybook-design-token/dist/components/primitives/Collapsible.js does not match the corresponding path on disk Primitives.
@ /xxx/node_modules/storybook-design-token/dist/components/TokenOverview.js 17:20-55

and a few more

@hermanc-fda
Copy link
Author

image

@Sqrrl
Copy link
Collaborator

Sqrrl commented Apr 5, 2020

This is strange. The case sensitivity issue with directories primitives and presenter should be fixed. Could you delete your node_modules and make a clean install? Inside node_modules/storybook-design-token/dist/components: Do you see the folders primitives and presenter or Primitives and Presenter?

@hermanc-fda
Copy link
Author

hermanc-fda commented Apr 6, 2020

Looks like the compile error is gone - thanks. I'm also getting this: any ideas?

image

I followed the trace and got here:

image

And my .scss file exists and has the proper annotations (it was working fine before).

I'm wondering if it has anything to do with the typeof css !== string condition, since css was, for whatever reason, undefined? !css is part of the else condition, so maybe that guard needs to be updated? Though I'm still unsure why the contents are undefined because the file exists.

@hermanc-fda
Copy link
Author

If it helps, here is my preview.js:

`import { addParameters } from "@storybook/react";

const scssReq = require.context("!!raw-loader!../shared", true, /..scss$/);
const scssTokenFiles = scssReq
.keys()
.map(filename => ({ filename, content: scssReq(filename).default }));

addParameters({
options: {
showRoots: true
},
designToken: {
files: {
scss: scssTokenFiles
}
}
});
`

and my scss file is in the shared folder and it's valid.

@Sqrrl
Copy link
Collaborator

Sqrrl commented Apr 6, 2020

Could you post the content of your __design-tokens.scss?

@Sqrrl Sqrrl added the bug Something isn't working label Apr 6, 2020
@hermanc-fda
Copy link
Author

I cut it down to this and it's still throwing the error:

image

/**

$color-base-accents-blue: #0033a1;

@Sqrrl
Copy link
Collaborator

Sqrrl commented Apr 24, 2020

Sorry, still cannot reproduce. Could you provide a reproduction repo? Are you using a custom webpack config? Maybe something is interfering with the loader.

@Sqrrl
Copy link
Collaborator

Sqrrl commented Jul 3, 2020

@hermanc-fda I'm closing this for now. Please re-open if you think it's still broken.

@Sqrrl Sqrrl closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants