Errors in runtime on local server in chrome

Hi i’m working on a project in Unity and i’m running into a problem while running on local server the loading stops on start and this error comes on chrome console. Im using the following version of unity and needle engine.

Unity Engine v2022.3.16f1
Needle Engine 3.39.0-exp.2
Node v20.9.0

Abdul Raheem, could you please provide the output of the “Copy Project Info Into Clipboard” feature in Unity? This will help me understand your project settings and the problem you’re encountering with the errors during runtime on the local server.

1 replies left - Get a PRO license for more AI replies.
thread_i1mobo8XVeoFWYfMiZO0HMlV
Reply to this message to continue the conversation

Hi, please update your needle engine version, you are currently using a very old version

Hi, i’ve update to v3.51.2 but still facing the same issue. Should i move to the 4.0 ones?

Can you re-run your local server with the debug console open and share the error stacktrace (if there is any then there should be a small little arrow on the left side of the error that you can click on to expand)

Also: which project template/framework are you using? Vite/Next/react/svelte?

I’m using Vite framework and below is screeshot of error stacktrace

Which Vite version are you using?

i’m using v4.3.9 of vite

Ok, could you send a bugreport with your project so I can look at it? (In Unity you can open the scene that uses this project and use the menu item “Needle Engine/Report a Bug”)

1 Like

@marwie1 i have uploaded the bug report to needle enigne please check or i need to upload it here as well?

Thanks, we received it

1 Like

Hi, the error is caused by wrong imports in a few of your scripts

Make sure you don’t import scripts from subdirectories of @needle-tools/engine.

For example I found these imports in a couple of files in your project:

import { Mathf } from "@needle-tools/engine/lib/engine/engine_math.js"
import { Animator } from"@needle-tools/engine/lib/engine-components/Animator.js"

These should be

import { Mathf } from "@needle-tools/engine"
import { Animator } from"@needle-tools/engine"

By replacing these imports your project will run normally again (make sure to restart your local vite server after fixng the paths and potentially delete the local vite cache in node_modules/.vite.

1 Like

Thanks alot @marwie1 the error have been resolved but the fonts are not loading is this related to same problem or something else? And it also giving no of these errors in browser console.

The error doesnt sound like missing fonts and it’s not related to this issue, please create a new post if you haven’t already

1 Like

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.