Skip to content

Error on Linux: "npm is not installed" Despite Node.jsNPM Being Detected in Project Validation #208

@Anass001

Description

@Anass001

Describe the bug 💬

I'm trying to install web project, but I'm encountering the following error:

npm is not installed - please install Node LTS first. Visit https://nodejs.org for more information. If you did install Nodejs and this message still appears please restart your computer.
UnityEngine.Debug:LogError (object)

I have two Node.js versions installed on my system:

  • v18.20.5 (set as the default version)
  • v20.13.1

In the Project Validation window, it detects Node.js v20.13.1 and NPM 10.5.2, but I still get the error in the console.

I'm new to Unity and Needle and i just started figuring things out, so I tried some suggested solutions found in the forum.

Steps I’ve tried so far:

  • Added the second Node.js path to the additional NPM search paths in the Project Validation window (so now there are two paths).
  • Changed default node version from 20.13.1 to 18.20.5
  • Restarted Unity.
  • Restarted my computer.

Unfortunately, none of these resolved the issue.

Operating System 👩‍💻

Linux

What browsers are you seeing the problem on? 🏄‍♂️

No response

Editor Version 🎲

2022.x

Needle Exporter version

3.51.0

Project Info (Unity only) 📜

{
  "ExportInfoGameObjectName": "Export",
  "ExportInfoGameObjectIsEnabled": true,
  "UnityProjectPath": "/home/../Needle4/Assets",
  "UnityVersion": "2022.3.54f1",
  "SceneName": "Sandbox",
  "ProjectPath": "Library/Needle/Sample",
  "ProjectDirectoryExists": true,
  "ProjectIsInstalled": true,
  "NeedleEngineInstalled": true,
  "HasNodeInstalled": false,
  "NodeVersion": null,
  "NpmVersion": null,
  "TypescriptVersion": null,
  "HasTokTxInstalled": true,
  "HasMinimumToktxVersionInstalled": false,
  "RenderPipeline": "Built-in",
  "GzipEnabled": false,
  "NeedleEngineExporterVersion": "3.51.0",
  "NeedleEngineVersion": "3.51.0",
  "NeedleEngineSamplesVersion": "0.18.0",
  "NeedleEngineExporterPath": "Packages/com.needle.engine-exporter/package.json",
  "NeedleEnginePath": "/home/../Needle4/Assets/../Library/Needle/Sample/node_modules/@needle-tools/engine/package.json",
  "FileStats": null,
  "NeedleComponentsInScene": [
    "Needle.Engine.ExportInfo",
    "Needle.Engine.Codegen.ComponentGenerator",
    "Needle.Engine.Shaders.SkyboxExportSettings",
    "Needle.Engine.Deployment.DeployToFTP",
    "Needle.Engine.HtmlMeta",
    "Needle.Engine.Components.GltfObject",
    "Needle.Engine.Components.SyncedRoom",
    "Needle.Engine.Components.Networking",
    "Needle.Engine.WebXR",
    "Needle.Engine.Components.XR.XRControllerModel",
    "Needle.Engine.Components.SpectatorCamera",
    "Needle.Engine.Components.SyncedCamera",
    "Needle.Engine.Components.AvatarBlink_Simple",
    "Needle.Engine.Components.PlayerColor",
    "Needle.Engine.Components.WebARSessionRoot",
    "Needle.Engine.Components.ObjectRaycaster",
    "Needle.Engine.Components.TeleportTarget",
    "Needle.Engine.Components.XRRig",
    "Needle.Engine.Components.OrbitControls",
    "Needle.Engine.Components.XRFlag",
    "Needle.Engine.Components.Deletable",
    "Needle.Engine.Components.SyncedTransform",
    "Needle.Engine.Components.DragControls",
    "Needle.Engine.Components.DeleteBox",
    "Needle.Engine.Components.BoxGizmo",
    "Needle.Engine.Components.Duplicatable",
    "Needle.Engine.Components.NeedleMenu",
    "Needle.Engine.Readme"
  ],
  "TypeCacheIsDirty": false,
  "TypeScriptTypes": []
}

Steps to reproduce 🔢

1. Create new unity project
2. Open Sample scene
3. Try to Install Web Project
...

Reproduction ♻

No response

Discord or Discussion link

No response

Validations 🩹

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions