Open Closed

Specified module 'app' does not exist (angular) #9894


User avatar
0
ademaygun created

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)

2 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    The error "Specified module 'app' does not exist" occurs because the Angular CLI cannot find a module named app when you use the --module app option. In Angular, the --module option expects the name of an existing module file (e.g., app.module.ts), not just app.

    Solution

    1. Use the Correct Module Path
      • Instead of --module app, specify the full path to your root module file, usually app.module.ts:
    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.
    1. Verify Module File Exists

      • Ensure that src/app/app.module.ts exists in your project. If your main module has a different name or location, adjust the path accordingly.
    2. 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 authors
    

    This will correctly generate the author module and update your app.module.ts with 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.

  • User Avatar
    0
    ademaygun created

    Hi,

    The app.module.ts file does not exist, it was not created by abp studio

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 16, 2025, 10:35