question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot create a Nestjs app

See original GitHub issue
  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

Using the ng g node-app myapp --framework=nestjs is expected to create a nestjs app.

Current Behavior

What is the current behavior?

I am getting an exception:

Cannot parse arguments. See below for the reasons.
Argument --framework could not be parsed using value "nestjs". Valid values are: "express", "none".

Failure Information (for bugs)

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. npm install -g @angular/cli @nrwl/schematics
  2. ng g node-app --framework=nestjs

Context

Please provide any relevant information about your setup:

  • Nx latest
  • Angular CLI 7.0.1
  • Angular DevKit ~0.801.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bhaidarcommented, Jul 18, 2019

Hey @wesleygrimes Thanks for your feedback.

I found this tutorial https://nx.dev/angular/tutorial/01-create-application really helpful in getting me started with Nx Workspace!

Things are now working like a charm 😃

Regards Bilal

1reaction
wesleygrimescommented, Jul 18, 2019

Hi Bilal,

I am sure you know this, just confirming…

By default, the Angular CLI refers to angular.json > cli > defaultCollection for which set of schematics to use. In your example, the CLI is still using default angular schematics.

You first need to convert your workspace to nx or generate a brand new nx workspace…

  1. First, make sure you are inside an nx workspace. If not, create a new one like this: npx create-nx-workspace my-workspace

  2. If you have an existing angular cli project you can convert to nx workspace by running this: ng add @nrwl/schematics

Once you are inside an nx workspace you can generate a nest app by doing the following:

  1. ng add @nrwl/nest --defaults
  2. ng g @nrwl/nest:app your-node-app

Let me know if this approach works.

Thanks, Wes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to create a new project with the Nest CLI
Just replace nest with npx @nestjs/cli for any command: ... Click Browse and find npm folder path ( %AppData%\Roaming\npm ) click add.
Read more >
Common errors - FAQ - A progressive Node.js framework
During your development with NestJS, you may encounter various errors as you learn the framework. ... Nest cannot create the <module> instance.
Read more >
First steps | NestJS - A progressive Node.js framework
To create a Nest application instance, we use the core NestFactory class. NestFactory exposes a few static methods that allow ...
Read more >
Standalone applications - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines ...
Read more >
Usage - CLI | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found