How to run needle-engine 4 in stackblitz

INFO: Waiting for license server to start...
npm ERR! code EIO
npm ERR! syscall write
npm ERR! errno -5
npm ERR! EIO: i/o error, write

npm ERR! A complete log of this run can be found in: /home/.npm/_logs/2024-12-25T03_43_31_327Z-debug-0.log
jsh: spawn npm EIO

npm start
that error and stop

Hi oot4chi. It looks like you’re experiencing an I/O error when trying to run Needle Engine 4 in StackBlitz. This kind of error typically indicates a problem with the environment where npm is trying to operate.

To help troubleshoot and fix the issue, please consider the following steps:

  1. Check the Environment: Ensure that StackBlitz supports the required Node.js version for Needle Engine 4. If there’s a specific version needed, try changing the environment settings in StackBlitz.

  2. Clear npm Cache: Sometimes clearing the npm cache can help fix I/O errors. You can run the following command:

    npm cache clean --force
    
  3. Check Disk Space: Ensure there is enough disk space in the environment, as low disk space can also cause I/O errors.

  4. Use Different Commands:
    Try using these commands instead of npm start:

    npm install
    npm run build
    npm start
    
  5. Check Logs: Look at the complete log mentioned in your error message. It can provide more insights into what specifically went wrong:

    /home/.npm/_logs/2024-12-25T03_43_31_327Z-debug-0.log
    
  6. Use a Local Environment: If possible, try replicating the setup on a local environment to see if the issue persists. Sometimes, issues are specific to online IDEs.

  7. Documentation and Examples: You might want to check the Needle Engine documentation or explore the sample projects to ensure everything is set up correctly: Needle Engine Docs.

If these steps do not resolve the issue, please check the logs and provide any relevant details that might help diagnose the problem further.

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

I can start now.
Why need to start local server in unity ?
require license server 127.0.0.1:8424.

Hi oot4chi. When using Needle Engine with Unity, starting a local license server is essential for several reasons:

  1. License Verification: The local server is responsible for verifying that you have a valid license to use Needle Engine. By checking in with the server running on 127.0.0.1:8424, it ensures that your development environment complies with licensing agreements.

  2. Feature Access: Some features of Needle Engine may require active validation to ensure that you are entitled to use them, which is managed through the local server.

  3. Development Flow: During development, having the server running allows you to quickly verify and access components and features without interruptions, streamlining your workflow.

Steps to Start the Local License Server:

  1. Run the Server: The license server usually comes packaged with the Needle Engine installation. You can start it typically through your Unity Editor or command line.

  2. Ensure Connection: Confirm that your Unity project can connect to 127.0.0.1:8424. If you’re facing connectivity issues, ensure no local firewall or network settings are blocking the connection.

  3. Monitor Server Logs: Keep an eye on the server logs while using Unity to track any potential issues with license validation.

If you need further assistance or understanding about setting it up, please provide specifics about the Unity version and Needle Engine version you’re using so I can give more tailored guidance!

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

Hi, thanks for reporting.
The license server is used to apply your Needle Engine license when starting your local dev server or when building the project. Seems like on Stackblitz the check if the server is running is prevented - I created an issue for this internally, thanks again.

After a few seconds the server starts however in Stackblitz in my tests (and it seems for you too) - you just can not build projects with a license there at the moment. Is that what you were trying to do?

Yes, that’s correct. how fix that?