ESLint: ENOENT: no such file or directory when referencing the secondary entry point
See original GitHub issueHi,
i have structure like this:
/libA
/src
/liba.module.ts
/core
/src
/lib
/models.ts
- LibA is primary entry point
- Core is secondary entry point
Everything is generated by NX schematics - @nrwl/angular:library and @nrwl/angular:library-secondary-entry-point so all files are generated correctly.
However, i would like to import models.ts and use it in libA.module.ts. But there is a problem…
When i import by generated path:
import { Something } from "@libA/core";
I got:
Error: ENOENT: no such file or directory, open 'libs/libsA/src/index.ts'
Occurred while linting ....
Rule: "@nrwl/nx/enforce-module-boundaries"
But everything is building fine
. When i change to relative path:
import { Something } from "../../core/src";
Lint error is gone, however i cannot build, because “is not under ‘rootDir’” error.
How should we import Secondary-entry-point files withing primary-entry-point files ? (under liba/src/lib) ?
Issue Analytics
- State:
- Created a year ago
- Reactions:10
- Comments:12 (2 by maintainers)
Top Results From Across the Web
File exists, but `ENOENT: no such file or directory...` reported.
This file existed in different branch. Workaround: delete repo where issue appears, create new folder with new path, clone repo. I've tried to ......
Read more >Solving the 'npm WARN saveError ENOENT: no such file or ...
First you will make your project directory. This is just an empty new directory. Let's call it ts . From inside the ts...
Read more >Configuring Jest
To read TypeScript configuration files Jest requires ts-node . ... The directory where Jest should store its cached dependency information.
Read more >How to Create and Publish a React Component Library
The entrypoint for our library (input) is the index.ts file in the src directory ... file: Error ENOENT: no such file or directory,...
Read more >Changelog | skuba - GitHub Pages
This release contains some breaking changes to the Lambda runtime such as the removal of AWS SDK V2 in favour of AWS SDK...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nrwl/nx/enforce-module-boundaries crashes ESLint for me as well when there’s a relative import.
We will look into it as soon as possible. Sorry to keep you all waiting.