简体   繁体   中英

"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

使用 npx create-nx-workspace someName

@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.

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.

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

This can be done using the following command:

npm install create-nx-workspace

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.

  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 (eg, 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM