[go: nahoru, domu]

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 fail #31

Open
imtrobin opened this issue Jun 9, 2023 · 0 comments
Open

Vite fail #31

imtrobin opened this issue Jun 9, 2023 · 0 comments

Comments

@imtrobin
Copy link
imtrobin commented Jun 9, 2023

Hi, I use Vite as my build tool, which is what three.js doc recommended. When running "npx vite" with fairygui, I get an error

caught TypeError: Cannot read properties of undefined (reading 'Vector3')
    at Stage.js:105:19
    at fairygui.js:4:31
    at fairygui.js:5:2
(anonymous) @ Stage.js:105
(ano

I tried vite with your other example https://github.com/fairygui/FairyGUI-threejs-example, it has more errors

Unable to parse HTML; parse5 error code invalid-first-character-of-tag-name
 at F:/Dev/Cas/External/FairyGUI-threejs-example/index.html:8:7
6  |      <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
7  |      <meta name="keywords" content="" />
8  |       <% for (var css in htmlWebpackPlugin.files.css) { %>
   |               ^
9  |      <link href="<%=htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
10 |      <% } %>

It seems that vite does not support non strict mode

https://vitejs.dev/guide/troubleshooting.html#syntax-error-type-error-happens

How can I get it to run with vite?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant