close

[Solved] Error: Unknown argument skipImport. Did you mean skip-import

I am trying to make a new Module using nest generate module But It is failing with the following error: Error: Unknown argument skipImport. Did you mean skip-import in NestJS. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

How Error: Unknown argument skipImport. Did you mean skip-import Occurs?

I am trying to make a new Module using nest generate module But It is failing with the following error:

Error: Unknown argument skipImport. Did you mean skip-import?
Failed to execute command: node @nestjs/schematics:module –name=messages –no-dry-run –no-skipImport –language=”ts” –sourceRoot=”src” –spec.

So here I am writing all the possible solutions that I have tried to resolve this error.

How To Solve Error: Unknown argument skipImport. Did you mean skip-import?

  1. How To Solve Error: Unknown argument skipImport. Did you mean skip-import?

    To Solve Error: Unknown argument skipImport. Did you mean skip-import If You are facing above error then your nestjs/cli version should be 8.2.7 and That version has some Bug so You can Either Upgrade nestjs/cli or You Can Downgrade nestjs/cli. First Of all Uninstall nestjs/cli. Just run this command: npm uninstall -g @nestjs/cli Then Downgrade nestjs/cli to 8.2.6 by running this command in your terminal: npm install -g nestjs/cli@8.2.6 And now, Your error will be solved. Thank You.

  2. Error: Unknown argument skipImport. Did you mean skip-import

    To Solve Error: Unknown argument skipImport. Did you mean skip-import There is a Bug in nestjs/cli 8.2.7 version So You need to update nestjs/cli to the latest version 8.2.8. First of all Uninstall nestjs/cli 8.2.7 then update nestjs/cli 8.2.8. Just run this command in your terminal: npm uninstall -g @nestjs/cli then npm install -g nestjs/cli@8.2.8 And Now, Your error must be solved.

Solution 1: Update nestjs/cli to 8.2.8

There is a Bug in nestjs/cli 8.2.7 version So You need to update nestjs/cli to the latest version 8.2.8. First of all Uninstall nestjs/cli 8.2.7 then update nestjs/cli 8.2.8. Just run this command in your terminal.

npm uninstall -g @nestjs/cli
npm install -g nestjs/cli@8.2.8

And Now, Your error must be solved.

Solution 2: Downgrade nestjs/cli to 8.2.6

If You are facing above error then your nestjs/cli version should be 8.2.7 and That version has some Bug so You can Either Upgrade nestjs/cli or You Can Downgrade nestjs/cli. First Of all Uninstall nestjs/cli. Just run this command.

npm uninstall -g @nestjs/cli

Then Downgrade nestjs/cli to 8.2.6 by running this command in your terminal.

npm install -g nestjs/cli@8.2.6

And now, Your error will be solved. Thank You.

Conclusion

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment