Why vite2+vue3 can't operate "Pptxgenjs" #7873
Replies: 8 comments 9 replies
-
anybody help me?????? |
Beta Was this translation helpful? Give feedback.
-
problem solved! just link the js :<script ***@***.***/dist/pptxgen.bundle.js"></script>
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2022年6月13日(星期一) 下午5:00
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [vitejs/vite] Why vite2+vue3 can't operate "Pptxgenjs" (Discussion #7873)
same issue. Vite never again.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I am having the same problem, as observed, all 504 files are from a commonjs module, which needs module interop. Refresh 2-3 times will make it works as normal, but it is not a great DX :( |
Beta Was this translation helpful? Give feedback.
-
I was having a similar problem node_modules 504 (Gateway Timeout) Vite and React. Removing node_modules and re-install |
Beta Was this translation helpful? Give feedback.
-
same problem, re-install is not work, and I reinstall diffrent node version, still have this error…… |
Beta Was this translation helpful? Give feedback.
-
in my case was enough to to restart |
Beta Was this translation helpful? Give feedback.
-
I am having same issue after cloning my Laravel Vue.js project on a macbook |
Beta Was this translation helpful? Give feedback.
-
If you are using Vite and experiencing this issue. |
Beta Was this translation helpful? Give feedback.
-
"Pptxgenjs" is a important tool for create ppt files from txt\dxf etcs.
i can use and operate "Pptxgenjs" in vue2, but when i import this package in vue3+vite2, problem is coming, it can not works!
the steps follows:
1, create vite2+vue3 enviroment, eg: npm create vite@latest, then choose vue3, and then npm install
2, npm install pptxgenjs --save
3, edit .vue file:
<script setup> import { ref, reactive } from "vue"; import pptxgen from "pptxgenjs"; </script>
4.npm run dev
the result is : wrong!
explorer show error are :
Failed to load resource: the server responded with a status of 504 (Gateway Timeout)
or
GET http://localhost:3000/node_modules/.vite/deps/vue.js?v=08ef60a3 net::ERR_ABORTED 504 (Gateway Timeout)
vscode show error are:
`X [ERROR] [plugin vite:dep-pre-bundle] Failed to resolve entry for package "https". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "https". The package may have incorrect main/module/exports specified in its package.json.
This error came from the "onResolve" callback
registered here:
The plugin "vite:dep-pre-bundle" was triggered
by this import
can you help me?
Beta Was this translation helpful? Give feedback.
All reactions