How to use an specific version of Needle Engine

Using:

  • Unity 2022.3.15f1
  • Node v20.16.0
  • Needle Engine installed by Package Manager (3.29.0)

I want to use the specific version of Needle Engine 3.29.0 but every time a run my project, it automatically changes to 3.44.6 and my console says :

Server is not responding - it could mean that another application is already running on port 3000 at …

But that doesn’t happens in version 3.47.

This is my project package.json :

{
  "name": "my-needle-engine-project",
  "version": "1.0.0",
  "type": "module",
  "scripts": {
    "start": "vite --host",
    "preview": "vite preview --host",
    "build:dev": "vite build",
    "build:production": "vite build -- --production",
    "gltf:transform": "npm run transform --prefix node_modules/@needle-tools/gltf-build-pipeline"
  },
  "dependencies": {
	  "@needle-tools/engine": "^3.29.0",
	  "rollup-plugin-copy": "^3.5.0",
	  "three": "npm:@needle-tools/three@^0.154.3"
	},
  "devDependencies": {
	  "@needle-tools/helper": "^1.6.0",
	  "@types/three": "0.154.0",
	  "@vitejs/plugin-basic-ssl": "^1.0.1",
	  "typescript": "^5.0.4",
	  "vite": "<= 4.3.9",
	  "vite-plugin-compression": "^0.5.1"
	}
}

Could you help me to pin the needle engine version, please ?

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

Since you didn’t mention the OS you’re using, please provide your operating system, and I can help you further! Just reply with your question. :blush:

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

Using Windows 11 Home

Thank you for the information, Diegoeloko!

To pin the Needle Engine version to 3.29.0 and prevent it from automatically updating to 3.44.6, you should modify your package.json slightly. Utilize an exact version instead of a caret (^). Here’s how you should adjust the dependencies section:

"dependencies": {
    "@needle-tools/engine": "3.29.0", // Change to exact version
    "rollup-plugin-copy": "^3.5.0",
    "three": "npm:@needle-tools/three@^0.154.3"
}

With this change, npm will install the specified version (3.29.0) without attempting to update it.

Make sure to also check the Node.js process if you encounter the “Server is not responding” error. Ensure no other instances are running on port 3000. You can stop any existing process on that port by executing the following command in your terminal:

npx kill-port 3000

After making these changes, try running your project again. If you still face issues, let me know!

1 replies left - GPT 4O
thread_mHAJRJCtNAxT1aBWlnPI7zn0
Reply to this message to continue the conversation

Thanks, I changed the dependencies like the follow code and it worked !

Which version of the Needle Engine Unity Package do you have installed at the moment? Please send a screenshot of the Package Manager window or your ExportInfo component in Unity.
If the version is updated to 3.44.6 that means that you have a newer Unity plugin installed and what you want is to downgrade the Unity plugin since newer versions are not guaranteed to be compatible with older Needle Engine versions.

To answer your original question however: If you write the dependency in the package.json like the following it will not be updated anymore by the Unity plugin: npm:@needle-tools/engine@3.29.0

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