Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'nx' is not recognized as the name of a cmdlet

Tags:

nrwl-nx

I am trying to add a new util library into my Nx mono repo. I googled and found the following command from www.nx.dev:

nx generate @nrwl/nest:library util/util-myLibName

When I run the above command, then I get the following message:

The term 'nx' 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.

I searched the web a lot, but couldn't find the solution.

like image 678
Mohsen Avatar asked Sep 02 '25 05:09

Mohsen


2 Answers

Tried the below command on Windows and it worked:

npm install -g nx

https://nx.dev/getting-started/nx-setup

like image 78
Karthik Avatar answered Sep 05 '25 00:09

Karthik


This is because the nx don't installed in your s.o

Try first

npm install -g @nrwl/cli

like image 27
Felipe Antunes Avatar answered Sep 05 '25 01:09

Felipe Antunes