question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] ENOENT: Error: File Not found

See original GitHub issue
Overview 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
vogloblinskycommented, May 16, 2018

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.

0reactions
lock[bot]commented, Sep 30, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: ENOENT: no such file or directory, open When trying to ...
When I make a post request on postman, it says in the console that it can't read a path that doesn't exist (which...
Read more >
15 Common Error Codes in Node.js and How to Fix Them
10. ENOENT. This error is a straightforward one. It means "Error No Entity" and is raised when a specified path (file or directory)...
Read more >
Error: ENOENT: no such file or directory, open '/tmp/google/api ...
I'm trying to upload an API (GRPC + REST) descriptor to cloud endpoints but I'm getting the following error: API parse error: Error:...
Read more >
Error: ENOENT: no such file or directory, open
Closed - Not a Bug ... Error: ENOENT: no such file or directory, open ... It will allow other developers to easily find...
Read more >
express error: enoent: no such file or directory, stat - You.com
I use res.download to send file to the client, when the file does not exist in the disk, some error will occur with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found