Specified module 'app' does not exist. Looked in the following directories: /src/app/book /src/app/app /src/app /src
- Exception message and full stack trace:
- Steps to reproduce the issue:
- Create new solution via Abp Studio 1.2.2
yarn ng generate module author --module app --routing --route authors(Tutorial)
5 Answer(s)
-
0
The error "Specified module 'app' does not exist" occurs because the Angular CLI cannot find a module named
appwhen you use the--module appoption. In Angular, the--moduleoption expects the name of an existing module file (e.g.,app.module.ts), not justapp.Solution
- Use the Correct Module Path
- Instead of
--module app, specify the full path to your root module file, usuallyapp.module.ts:
- Instead of
yarn ng generate module author --module src/app/app.module.ts --routing --route authors- This tells Angular CLI to import the new module into
src/app/app.module.ts.
Verify Module File Exists
- Ensure that
src/app/app.module.tsexists in your project. If your main module has a different name or location, adjust the path accordingly.
- Ensure that
Reference from Official Tutorial
- The official ABP Book Store tutorial uses the following command:
yarn ng generate module author --module app --routing --route authors- However, if your project structure is different or the CLI cannot resolve
app, always use the explicit path as shown above.
Example
yarn ng generate module author --module src/app/app.module.ts --routing --route authorsThis will correctly generate the
authormodule and update yourapp.module.tswith the new import.
Sources:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
- Use the Correct Module Path
-
0
Hi,
The app.module.ts file does not exist, it was not created by abp studio
-
0
Hello,
This is because the templates are migrated to the standalone structure. Here are references:
- Release notes: https://abp.io/docs/latest/studio/release-notes#1-2-1-2025-08-14,
- Article: https://abp.io/community/articles/abp-now-supports-angular-standalone-applications-zzi2rr2z#gsc.tab=0
-
0
Sure, we will be gradually updating the tutorials and samples.