Repository navigation
Description
Overview of the issue
Generation breaks:
Unhandled Rejection at: Promise { <rejected> { Error: File not found: C:/Dev/KPD2.0/src/app/stage/@app/stage/apps/apps-routing.module.ts
the @-path is just appended and not correctly resolved from the ts-config.json file
This is the line in Typescript that breaks:
import {appsRoutes} from '@app/stage/apps/apps-routing.module';
(the file of this line is inside C:/Dev/KPD2.0/src/app/stage)
Operating System, Node.js, npm, compodoc version(s)
Node: 8.11.1
OS: win32 x64 (Windows 10)
npm 6.0.1
CompoDoc: 1.1.5
Angular configuration, a package.json file in the root folder
tsconfig:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"paths": {
"@test/": ["test/"],
"@app/": ["app/"],
"@env/": ["environments/"]
},
"lib": [
"es2016",
"dom"
],
"plugins": [
{"name": "@angular/language-service"}
]
}
}
Compodoc installed globally or locally ?
locally
If possible sourcecode of the file where it breaks
import {appsRoutes} from '@app/stage/apps/apps-routing.module';
If possible your terminal logs before the error
`Unhandled
Rejection at: Promise {
{ Error: File not found: C:/Dev/KPD2.0/src/app/stage/@app/stage/apps/apps-routing.module.ts
at FileNotFoundError.BaseError [as constructor] (C:\Dev\KPD2.0\node_modules\ts-simple-ast\dist\errors\BaseError.js:7:28)
at new FileNotFoundError (C:\Dev\KPD2.0\node_modules\ts-simple-ast\dist\errors\FileNotFoundError.js:8:28)
at Project.addExistingSourceFile (C:\Dev\KPD2.0\node_modules\ts-simple-ast\dist\Project.js:188:19)
at _loop_3 (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:1309:33)
at RouterParserUtil.cleanFileSpreads (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:1337:13)
at AngularDependencies.getSourceFileDecorators (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:6304:48)
at C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:6118:31
at Array.map ()
at AngularDependencies.getDependencies (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:6106:21)
at CliApplication.Application.getDependenciesData (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:7971:40)
filePath: 'C:/Dev/KPD2.0/src/app/stage/@app/stage/apps/apps-routing.module.ts',
code: 'ENOENT' } } reason: { Error: File not found: C:/Dev/KPD2.0/src/app/stage/@app/stage/apps/apps-routing.module.ts
at FileNotFoundError.BaseError [as constructor] (C:\Dev\KPD2.0\node_modules\ts-simple-ast\dist\errors\BaseError.js:7:28)
at new FileNotFoundError (C:\Dev\KPD2.0\node_modules\ts-simple-ast\dist\errors\FileNotFoundError.js:8:28)
at Project.addExistingSourceFile (C:\Dev\KPD2.0\node_modules\ts-simple-ast\dist\Project.js:188:19)
at _loop_3 (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:1309:33)
at RouterParserUtil.cleanFileSpreads (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:1337:13)
at AngularDependencies.getSourceFileDecorators (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:6304:48)
at C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:6118:31
at Array.map ()
at AngularDependencies.getDependencies (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:6106:21)
at CliApplication.Application.getDependenciesData (C:\Dev\KPD2.0\node_modules@compodoc\compodoc\dist\index-cli.js:7971:40)
filePath: 'C:/Dev/KPD2.0/src/app/stage/@app/stage/apps/apps-routing.module.ts',
`
Motivation for or Use Case
Reproduce the error
Just use an @-path inside the Typescript sourcefile
Related issues
Suggest a Fix
build the @-path correctly by replacing it with the info from tsconfig.json
instead of appending it to the source-file current path
Activity
[-]File Not Found - Error -> @-path from tsconfig.json not working[/-][+][BUG] File Not Found - Error -> @-path from tsconfig.json not working[/+]stale commentedon Sep 30, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale commentedon Oct 7, 2019
This issue has been automatically closed because it has not had recent activity. Please file a new issue if you are encountering a similar or related problem. Thank you for your contributions.
ReyOrtiz commentedon Nov 8, 2019
The issue is still present in 1.1.11 version. Can it be reopened please?
lock commentedon Jan 7, 2020
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.
test(router): cover @app alias spread resolution