AngularDoc / angulardoc.github.io

angulardoc.github.io web site
https://angulardoc.github.io
34 stars 2 forks source link

Angular Doc is looking in the wrong place #2

Closed NateMay closed 6 years ago

NateMay commented 7 years ago

I've been unable to visualize my project and the following error output leads me to believe that AngularDoc is looking in the wrong place:

Error occurred while scanning files: Error: ENOENT: no such file or directory, stat /Users/#ME#/Code/v5/app.component.ts

the correct path to app.component.ts is /Users/#ME#/Code/v5/src/app/app.component.ts

Is there a way to specify the correct path in my angulardoc.json file? I can't find any documentation on the configuration.

{
  "repoId": "aa1c5a9c-3d99-4cb3-bd8f-40bbc03785e3",
  "directoryFilter": [
    "!typings",
    "!node_modules",
    "!.vscode"
  ],
  "fileFilter": [
    "**/!(*.*spec).ts"
  ],
  "lastSync": 1483602408301
}
agiledigits commented 7 years ago

@NateMay what's the workspace root for this project?

NateMay commented 7 years ago

/Users/#ME#/Code/v5

NateMay commented 7 years ago

OK, So I noticed that Components began appearing after I edited them. I went through and edited a simple space and now all of the meta data appears in the class tab, the modules tab, and the imports tab, but I still have noting for the overview tab or the routes tab.

NateMay commented 7 years ago

I can't get it to register my main.ts under /src/ which holds my platformBrowserDynamic().bootstrapModule(AppModule); statement.

agiledigits commented 7 years ago

We are unable to reproduce it on our side unfortunately. Could you send us a slimed down project for us to debug with?

doggy8088 commented 6 years ago

@agiledigits I'm also experience the same problem. I'm on Windows 10 1803 (OS Build: 10.0.17134.48). Here is the screenshot below:

image

ENOENT: no such file or directory, stat 'C:\g:\Projects\demo9\src\app'

The PATH is obvious wrong. My project path is at g:\Projects\demo9\src\app but AngularDoc translated to C:\g:\Projects\demo9\src\app.

agiledigits commented 6 years ago

@doggy8088 Could you send us your angular.json file?

doggy8088 commented 6 years ago

@agiledigits I've just run ng new demo9 to create a brand new project in my Windows 10 1803 with Angular CLI 6.0.8. Here is my angular.json file below:

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "demo9": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "prefix": "app",
      "schematics": {},
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist/demo9",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.app.json",
            "assets": [
              "src/favicon.ico",
              "src/assets"
            ],
            "styles": [
              "src/styles.css"
            ],
            "scripts": []
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "demo9:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "demo9:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "demo9:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.spec.json",
            "karmaConfig": "src/karma.conf.js",
            "styles": [
              "src/styles.css"
            ],
            "scripts": [],
            "assets": [
              "src/favicon.ico",
              "src/assets"
            ]
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "src/tsconfig.app.json",
              "src/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    },
    "demo9-e2e": {
      "root": "e2e/",
      "projectType": "application",
      "architect": {
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "e2e/protractor.conf.js",
            "devServerTarget": "demo9:serve"
          },
          "configurations": {
            "production": {
              "devServerTarget": "demo9:serve:production"
            }
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": "e2e/tsconfig.e2e.json",
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    }
  },
  "defaultProject": "demo9"
}

By the way, I'm using Schematics feature in the EXPLORER in Visual Studio Code.

agiledigits commented 6 years ago

@doggy8088 I believe we've got a fix. Will release it soon.

agiledigits commented 6 years ago

@doggy8088 Please install v6.0.3 and see if it fixed your issue.

doggy8088 commented 6 years ago

@agiledigits Confirmed. It works perfectly now! Thanks. 👍

agiledigits commented 6 years ago

Cool!