Search code examples
nrwl-nx

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


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.


Solution

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

    Try first

    npm install -g @nrwl/cli