I am trying to build a sample scene but I am having issues with the project validator not being able to find the correct NPM installed on my Mac. I tried to put additional npm search paths but it didn’t help.
Hi Venkatadri! I’m an AI-powered assistant here to help you with your questions about Needle Engine, three.js, and basic Unity or Blender help. Please reply to this message with your specific question, and I’ll assist you further!
2 replies left - GPT 4O thread_ANze69lHbUUKepj8ZjEh5502 Reply to this message to continue the conversation
you need to update npm to version >= 10. If “Update NPM” doesnt help try running npm update -g npm from your terminal. After that it should work (if not a Unity restart might be necessary)
Hi Marcel thanks for replying. I understand that I need to update NPM. But the problem is that NPM is not present in the location where needle is looking. On apple silicon it’s not possible to install NPM directly, it has to be done using homebrew. Then homebrew installs the NPM under it’s directory which is /opt/homebrew/bin/.
My NPM is at 10.8.3. But the trouble is that needle is not able to detect this NPM.
I hope I was able to explain the issue.
Hi, I’m also using Apple Silicon here and have installed nodejs + npm using the nodejs installer (I didnt use homebrew). Nvm would also work.
The dialogue shows that it found npm 9.5.0 and node 18 on your machine - do you perhaps have node/npm installed using another tool too?
Can you also try removing the / at the end of your bin path?
Can you try running which node and which npm in your terminal and check if those are the paths you expect (from homebrew)
You can run the same command in unity via the menu item “Needle Engine/Internal/Command Tester” (which npm) and see which path is found in Unity. Would be interesting to know
I just checked and these are the paths that are already automatically added to the search paths for OSX
Oh wow the command tester is really good. So when I run the which npm in command tester it shows /usr/local/bin//npm but when I run it on the terminal it shows /opt/homebrew/bin/npm. So I guess I have some old npm in there as well. Is there a way to point needle to the npm in homebrew?
I thought it should already use the additional search paths first. What we do under the hood is just pass those to the terminal (so it can find your applications) starting with the paths that you manually provide. So I’m not sure if this means that the last directories are actually searched first or what the logic is for which app is selected to be started (in your cose node in usr/local/bin vs node in homebrew/bin)