zante23
zante23

Reputation: 53

"create-nx-workspace" command not found (linxus and windows10 problem)

Can someone please explain me how to setup nrwl/schematics? I'm trying to follow along a course from frontendmasters and they are using nrwl to generate workspace. When I run the same command on my machine (both windows and linux OS) that command is not found

create-nx-workspace someName

Please help me setup this workspace and understand why am I getting this error message. On windows I know that this usually means (not recognized cmdlet) that the PATH to executable is not defined but I have no idea where the path is supposed to be and I couldn't find the answer.

Any help is truly appreciated. Regards

So far I have tried installing @nrwl/schematics as roo/administrator, reinstaling, rebooting PC, tried the stpes on both Linux and Windows

Upvotes: 4

Views: 11617

Answers (6)

Atif Majeed
Atif Majeed

Reputation: 1071

@nrwl/nx - mentioned in the first answer is deprecated. You need to install @nrwl/cli.

npm install -g @nrwl/cli

That will make nx available on windows path.

Upvotes: 2

saif ali
saif ali

Reputation: 1

  1. First of all, you have to install some tools use cmd or terminal

npm i -g @nrwl/schematics

npm i -g create-nx-workspace

  1. then create new workspace using

npm init nx-workspace

complete the following question display on cmd/terminal

? Workspace name (e.g., org name)
? What to create in the new workspace ? CLI to power the Nx workspace.
? Use the free tier of the distributed cache provided by Nx Cloud.

Upvotes: 0

user9573798
user9573798

Reputation:

You can use npx to create node application. First of all, you have to install some tools which are mention below the commands.

npm i -g @nrwl/schematics
npx create-nx-workspace

You will have many options to choose the project's framework like angular, react and many more. Choose the requirements of your project and go on.

Upvotes: 0

SameOlds
SameOlds

Reputation: 31

create-nx-workspace module needs to be installed first.

This can be done using the following command:

npm install create-nx-workspace

Upvotes: 0

Arunsai B K
Arunsai B K

Reputation: 213

use npx create-nx-workspace someName

Upvotes: 4

Ben Rauzi
Ben Rauzi

Reputation: 604

First npm i @nrwl/nx in your terminal. (I haven't worked with nx but I believe this is required for @nrwl/schematics. Then: npm install @nrwl/schematics

For more - Take a look here, it described the process quite well: https://www.npmjs.com/package/@nrwl/nx

Note: You can add nx to a current Angular workspace with ng add @nrwl/schematics or create a new one.

Upvotes: 1

Related Questions