Bash: lng: command not found

Hello all;
I am very new to LightningJS and from the samples I’ve seen, am very keen to learn it, but I seem to got stuck at the very beginning.
npm packages for both CLI and SDK are globally installed on a Windows 10 machine, but I cannot figure out how to run long as I keep getting the above

bash: lng: command not found

of from PowerShell:

PS C:\Users\MachineUno> lng -V
lng : The term 'lng' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ lng -V
+ ~~~
    + CategoryInfo          : ObjectNotFound: (lng:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

The documentations very unhelpfully just provided:

If the Lightning CLI is installed successfully, you can use it anywhere on your machine using the lng command.

Can someone guide me please

Hi @Bruce_Royce, welcome to the forums!

It seems like something went wrong with your installation.

I’m not very experienced with Windows myself, but it seems like a path isn’t correctly pointing to the bin folder. Do you have the same issue with other globally installed binaries?

I asked around quickly and it seems other devs are running the Lightning CLI successfully on Windows. Could you maybe try to uninstall and install the CLI again?

1 Like

Sorry I didn’t get your reply sooner.
I do a bit of Vue and React, … and other npm global installs seem to run fine.
In fact, I can see the following listed under node_modules_global after the installation: (please see the screenshot)

I even tried to run it from inside the folder with no luck!
I will try to uninstall and reinstall and will report back

Thanks for taking the time to reply! I was starting to give up the hope :blush:

Sorry, deleted the last one for bad formatting!

Also, here is the content of the lng.cmd just in case:

@ECHO off
GOTO start
SET dp0=%~dp0
CALL :find_dp0

IF EXIST "%dp0%\node.exe" (
  SET "_prog=%dp0%\node.exe"
) ELSE (
  SET "_prog=node"

endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\node_modules\@lightningjs\cli\bin\index.js" %*

The default node_module path for Windows should be something like this.