[BUG] ENOENT: Error: File Not found
See original GitHub issueOverview of the issue
While running the default compodoc -p tsconfig.json -s
, the procedure gets stuck with an ENOENT error:
[11:40:37] Empty metadatas, trying to found it with imports.
Unhandled Rejection at: Promise {
<rejected> { Error: File not found: C:/Users/<user>/svn/ng2framework/hx-base/src/app/Framework/SubModules/Svc.ts
at FileNotFoundError.BaseError [as constructor] (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\dist\errors\BaseError.js:16:28)
at new FileNotFoundError (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\dist\errors\FileNotFoundError.js:17:28)
at Project.addExistingSourceFile (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\dist\Project.js:264:19)
at ImportsUtil.findValueInImportOrLocalVariables (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:639:23)
at Dependencies.findProperties (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:6092:41)
at visitNode (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:5605:43)
at Array.forEach (<anonymous>)
at parseNode (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:5726:64)
at C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:5978:13
at visitNodes (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\node_modules\typescript\lib\typescript.js:13999:30)
filePath: 'C:/Users/<user>/svn/ng2framework/hx-base/src/app/Framework/SubModules/Svc.ts',
code: 'ENOENT' } } reason: { Error: File not found: C:/Users/<user>/svn/ng2framework/hx-base/src/app/Framework/SubModules/Svc.ts
at FileNotFoundError.BaseError [as constructor] (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\dist\errors\BaseError.js:16:28)
at new FileNotFoundError (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\dist\errors\FileNotFoundError.js:17:28)
at Project.addExistingSourceFile (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\dist\Project.js:264:19)
at ImportsUtil.findValueInImportOrLocalVariables (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:639:23)
at Dependencies.findProperties (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:6092:41)
at visitNode (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:5605:43)
at Array.forEach (<anonymous>)
at parseNode (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:5726:64)
at C:\Users\<user>\svn\ng2framework\hx-base\node_modules\@compodoc\compodoc\dist\index-cli.js:5978:13
at visitNodes (C:\Users\<user>\svn\ng2framework\hx-base\node_modules\ts-simple-ast\node_modules\typescript\lib\typescript.js:13999:30)
filePath: 'C:/Users/<user>/svn/ng2framework/hx-base/src/app/Framework/SubModules/Svc.ts',
code: 'ENOENT' }
Operating System, Node.js, npm, compodoc version(s)
Operating System: Windows 10 Node.js version: v.8.9.2 NPM version: v.5.5.1 Compodoc version: ^1.1.2
Angular configuration, a package.json
file in the root folder
I’m using the Angular Starter project: https://github.com/gdi2290/angular-starter And I’ve added some stuff to it, though the package.json is the exact same, aside some additional packages which doesn’t really impact at all.
Compodoc installed globally or locally ?
Compodoc is installed locally.
Motivation for or Use Case
I guess because of that:
[11:40:37] Sorry, but there was a problem during parsing or generation of the documentation. Please fill an issue on github. (https://github.com/compodoc/compodoc/issues/new)
Reproduce the error
It’s not that easy to reproduce the issue, since the project is quite big already. However, the folder where the error is thrown (the analyzed folder), has an index.ts file which holds these informations:
export { AuthUser } from './classes/user/authuser.class';
export { AuthAziende } from './classes/IAuth';
export * from './classes/ICore';
export * from './classes/IDocument';
export * from './classes/IEntityFramework';
export * from './classes/ISettings';
export * from './classes/IStore';
export { ILoginResponse } from './interfaces/ILoginResponse';
export { IGenericList } from './interfaces/IGenericList';
export { IGenericEntity } from './interfaces/IGenericEntity';
export { IDefaultRequest } from './interfaces/IDefaultRequest';
export { IWSResponse } from './interfaces/IApp';
export { RestService } from './services/rest/rest.service';
export { SVCService } from './services/shared/standard.svc.service';
export { HxSVCModule } from './Framework.svc.module';
I would guess the issue is somehow there, since there is no Svc.ts file, just Svc folder.
Related issues
None.
Suggest a Fix
See above
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
One workaround is to go deeper when you import something from a barrel file, pointing to index.ts
import { FooterComponentSchema } from './metadatas';
import { FooterComponentSchema } from './metadatas/index';
Waiting feedback from ts-simple-ast library.
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.