Closed muxles closed 2 years ago
This is an integration question, not a bug.
Add the necessary libraries into your package file as needed.
Ex:
"dependencies": {
"https": "^1.0.0",
"image-size": "^1.0.0",
"jszip": "^3.7.1"
},
ERROR: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "https".
Is there any way to solve the errors caused by vite? @muxles
@gitbrent I disagree that it's purely an integration question - https
hasn't been updated in 8 years and doesn't seem to work with modern build tools, so depending on it is bad for future proofing. The earlier comment relating to Vite is the same issue that I'm having, though I was able to fix it with a patch-package
replacing your require("https")
calls with require("node:https")
-- I've attached the patch file here, so @front-endLiu if you want to try that as a fix, just extract this file to your root directory and call npx patch-package
.
I haven't tested this thoroughly and I don't have the resources to, but it's maybe a starting point
Also would like to disagree with this being an integration issue. This is an issue of a dependency not being modernized and will prevent this library for being built using vite. which, as I am sure we all know, powers a measurable amount of modern development builds. Can this be reopened and addressed?
Thank you for reporting an issue, suggesting an enhancement, or asking a question.
We appreciate your feedback - to help the team understand your needs please complete the below template to ensure we have the details to help. Thanks!
Please check out the Docs to see if your question is already addressed there. This will help us ensure our documentation covers the most frequent questions.
Category
Version
Please specify what version of the library you are using: [3.10.0]
Please specify what version(s) of PowerPoint you are targeting: [2016/2019]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Expected / Desired Behavior / Question
PptxGenJS should run as expected within Svelte-Kit.
Observed Behavior
Errors are produced when attempting to import PptxGenJS.
ERROR: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "https".
Steps to Reproduce
Errors will occur.