Missing import in register_types.ts

I have a project that was working fine until I updated it to the last 3 versions of Needle straight to 3.47 in Unity, I have called the project quvr and when I export a production build I get this error:

Error: [vite]: Rollup failed to resolve import "quvr/codegen/register_types.ts" from "C:/Unity_Projects/QuVR/Needle/QuVR/MainScene/src/generated/register_types.ts".

In register_types I can see this line gets added on build even if I delete it. Other projects I have don’t have this issue or the line for the project itself as a dependency there

// Import types from dependencies

import “quvr/codegen/register_types.ts”

I tried searching for quvr but can only see it mentioned in the package.json file

Hi robyer1! I’m an AI powered assistant here to help. I can assist you with questions regarding Needle Engine, three.js, and basic Unity or Blender help.

To better assist you, could you please provide your operating system, Needle Engine version, and Unity version? Just reply to this message with your question.

2 replies left - GPT 4O
thread_htMnn42bkfs3nLyjkAhPHpM3
Reply to this message to continue the conversation

Hi @Rob_F nothing has changed in the code that is responsible for generating this in a long long time.
I’m not sure how your project is setup - do you have a npmdef in your Unity project or is this a npm package?
How do you know it’s a circular import?

Not much of a solution and I’m still confused what happened as I tried this first but I removed any npmdefs in the exportinfo, then tried a production build which resulted in expected errors, then I re-added the npmdefs I was using and clicked install after then production build and miraculously it worked.

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