-
Notifications
You must be signed in to change notification settings - Fork 180
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
fix(1522): externalize dom-to-image-more #1540
fix(1522): externalize dom-to-image-more #1540
Conversation
✅ Deploy Preview for carbon-charts-react ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for carbon-charts-angular ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for carbon-charts-core ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hoisting issue resolved and corrected a few other minor issues blocking the build (overly sensitive typescript settings from missing parameters, missing dependency for charts-react). Builds successfully now. Just pushed those updates. |
Now we're good! |
Hi @theiliad - Got several other PRS I wanted to submit (Storybook, vite everywhere, etc.) but was waiting for this one to get merged (as it gets rid of the offline packages). Any thoughts as to when this one can be merged? |
Hi @nstuyvesant the issue right now is the |
c976fe6
to
99927c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😓
I think there's an issue with yarn now on Netlify https://app.netlify.com/sites/carbon-charts-core/deploys/6440203d8a33c40008a82df5
This might be because of the .yarnrc.yml
change?
Just dropped two of the commits from this PR. That should resolve your issue. In general, I would like to get rid of the yarn-offline-mirror-cache from the repo as it's a storage challenge and makes contributing problematic. The modified .gitignore but did not touch the directory for now. Perhaps a separate PR could be created to resolve some of the workspace issues around yarn and lerna? |
It seems like builds are still showing the same error. Why would we drop |
Not all contributors have the available storage to keep all the dependencies for a fork in their GitHub account. |
Oh interesting! I didn't know that. How does that happen? |
Let's say I update a bunch of dependencies or change the yarn version (which switches the cache from .tgz to .zip and changes all the cached dependencies), then I am incurring the storage for all the changed dependencies in my fork. This monorepo has a large set of dependencies so it's more likely to tip me over my limit. If others want to contribute, they will face the same thing if they change lots of dependencies on their forks. Including the yarn-offline-mirror in the repo is like including node_modules. All of that can be reconstituted with a simple Also, yarn 1.22.19 is the last version of yarn to use the .yarnrc (without the .yml extension). The options for yarn-offline-mirror and yarn-offline-mirror-pruning no longer exist post 1.22.19. |
@theiliad - just pushed some small changes that keep yarn at 1.22.19 (for now) but solve problems for contributors while laying the foundation for a yarn upgrade (newer .yarnrc.yml format, packageManager in package.json, simplified workspace property in package.json). Please let me know if you have any concerns or questions. After these items are merged, it will be much easier to cherry-pick non-breaking changes from my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Only thing I noticed is the contents of .yarn/releases/yarn-1.22.19.cjs
seems weird, there are some weird symbols showing up in there.
Can we use the JS file available here instead?
https://github.com/yarnpkg/yarn/releases/tag/v1.22.19
I could also update it if you add me as a collab to your fork
Actually for licensing purposes, are we able to avoid having that file in the repo? Other than that looks good to me 💯 thanks for working on these |
Hi again. That file represents the public sources to yarn 1.22.19. I didn't see any odd characters myself but it is very long. The license is referenced on line 1979. Many public repos have these like:
The newer .yarnrc.yml expects the yarn sources to be there (and part of the project). If it's removed, the reference to it would also have to be removed from .yarnrc.yml but yarn versions after 1.22.19 will require it. Here's a Q&A on the yarn website about not gitignoring the .yarn/releases folder... https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored. If you are using modern yarn (versions 2.0 to 3.5.0), here's the install process: https://yarnpkg.com/getting-started/install. Once performed you can set a project to use 1.22.19 (or apply it globally - switching between versions is trivial). The yarn release file you found was created by the command, Hope this helps! |
Thanks @nstuyvesant 💯 |
Hi,
A vite build fails with the following error message:
These are my current Carbon dependencies from the package.json:
I have already tried a lot including:
I'm not sure if this is a bug or a combination with the configuration. Can someone please help me to get the project running again? |
If you are using rollup...
For vite...
Can potentially do the exclusion in the charts-svelte package itself. Previously, dom-to-image was part of the core project and caused problems with SvelteKit when running dev (vite). Now that it's externalized, it's easier to mitigate (with the two examples above). |
I just submitted #1545 to simplify things for projects and packages that consume |
Thank you very much, it works now with these settings. |
Hello, I was a bit too hasty, unfortunately it does not always work. I installed dom-to-image-more as a module, and added the following dependency to the package.json file: It works when I start it with vite dev, but not with vite preview or vite build. The browser console shows the following error message: Do you have any suggestions on how to fix this error? |
That is odd. On a separate note, there is a conflict between rollup and dom-to-image-more that I hope will be resolved by tomorrow on the dom-to-image-more side. At that point, I have a PR that will bundle dom-to-image-more within As a temporary solution, perhaps downgrade to 1.6.14 until this is resolved. It should not take long. |
The update to |
Updates
classnames
dependency for charts-react (was missing - not sure why)Review checklist (for reviewers only)