. Advertisement .
..3..
. Advertisement .
..4..
Some possible solutions have been learned and tried to fix the error: “Unknown argument skipImport. Did you mean skip-import” that I get while trying to create a new module using the nest generate module. If you’re in the same situation as me, this article may help you.
What’s the cause of the error “Unknown argument skipImport. Did you mean skip-import”?
Nestjs/cli is known as a command line interface tool which can help you start, develop and sustain your Nest applications. It supports you in many different ways such as building and bundling the application for product distribution and scaffolding the project, serving it in development mode. To promote well-structured apps, it embodies best-practice architectural patterns.
Nestjs/cli 8.2.7 is the version that easily encounters the error “Unknown argument skipImport. Did you mean skip-import”. It contains some “bugs” that are causing that error. Bugs in computer programs are defined as software or system errors. These errors will affect the software or the system that does not produce correct results or does not function as intended.
What can we do to fix Error: “Unknown argument skipImport. Did you mean skip-import”?
In general, you can switch your nestjs/cli to another version that does not have errors. Usually, you can upgrade your nestjs/cli version to the latest available version or lower version of 8.2.7 such as 8.2.6. Just run this command: npm install -g nestjs/[email protected] to upgrade your nestjs/cli to 8.2.8 or run the command npm install -g nestjs/[email protected] in your terminal to downgrade nestjs/cli to 8.2.6. With these ways, the error “Unknown argument skipImport. Did you mean skip-import” will be fixed. Now we will go into detail about the steps for each solution.
Solution 1: Upgrade nestjs/cli to 8.2.8
The first step to upgrading to version 8.2.8, which is also the latest version, is you need to uninstall version 8.2.7 with the command:
npm uninstall -g @nestjs/cli.
There also have some ways that you can try:
Ø Uninstall 8.2.7 via Programs and Features
Ø Uninstall 8.2.7 with its uninstaller.exe
Ø Uninstall 8.2.7 via System Restore
Ø Uninstall 8.2.7 with Antivirus
Ø Reinstall 8.2.7 to uninstall
Ø Apply the Uninstall Command Displayed to the Registry
Ø Uninstall 8.2.7 with Third-party Uninstaller.
Then install version 8.2.8:
npm install -g nestjs/[email protected]
After doing that, your error is fixed.
Solution 2: Downgrade nestjs/cli to 8.2.6
Another way to fix the error: “Unknown argument skipImport. Did you mean skip-import” is to downgrade nestjs/cli. Just like when upgrading, you also have to uninstall version 8.2.7 with the command:
npm uninstall -g @nestjs/CLI
Or other ways mentioned above, after that use the command:
npm install -g nestjs/[email protected] to install 8.2.6
Conclusion
Good luck in fixing the error: “Unknown argument skipImport. Did you mean skip-import”. Hope our solutions can help you. Let us know which solution worked best for you and if you have any comments or questions don’t hesitate to write them down in the comments section. Thank you for taking the time to read this article.
Read more
Leave a comment