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

Vite/Svelte project error due to Conic Gradient Tailwind colors import #344

Closed
endigo9740 opened this issue Oct 8, 2022 · 4 comments · Fixed by #345
Closed

Vite/Svelte project error due to Conic Gradient Tailwind colors import #344

endigo9740 opened this issue Oct 8, 2022 · 4 comments · Fixed by #345
Assignees
Labels
bug Something isn't working

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented Oct 8, 2022

Current Behavior

Error Message:
Uncaught SyntaxError: The requested module '/node_modules/tailwindcss/colors.js?v=89ada807' does not provide an export named 'default' (at ConicGradient.svelte:7:16)

Screen Shot 2022-10-08 at 1 23 52 PM

Here's the colors file it's attempting to import from the Tailwind package:

Screen Shot 2022-10-08 at 1 45 42 PM

Steps To Reproduce

  1. Follow installation instructions for Vite project
  2. Add any Skeleton component to the project
  3. The error will begin to appear

Anything else?

As a temporary workaround you can open the following file and comment out the Conic Gradient references:

/node_modules/@brainandbones/skeleton/index.js

@endigo9740 endigo9740 added the bug Something isn't working label Oct 8, 2022
@endigo9740 endigo9740 self-assigned this Oct 8, 2022
@endigo9740
Copy link
Contributor Author

endigo9740 commented Oct 8, 2022

I've created a support thread issue for this issue on the Vite Discord here:
https://discord.com/channels/804011606160703521/1028380962607874089

I'll aim to reach out to Tailwind support next.

@endigo9740
Copy link
Contributor Author

Tailwind Discord support thread:
https://discord.com/channels/486935104384532500/1028385804931833967

@endigo9740
Copy link
Contributor Author

endigo9740 commented Oct 8, 2022

See the following:
https://tailwindcss.com/docs/configuration#referencing-in-java-script

Consider making our Theme Generator color reference part of the /lib and uses this as our source rather than the import method:
https://github.com/Brain-Bones/skeleton/blob/dev/src/docs/DocsThemer/colors.ts

The pros and cons of this is we control the data, but it doesn't automatically update if the palette updates over time.

@endigo9740 endigo9740 linked a pull request Oct 9, 2022 that will close this issue
4 tasks
@endigo9740
Copy link
Contributor Author

I've opted for the latter option. See the PR to review how this has been changed.

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

Successfully merging a pull request may close this issue.

1 participant