ng test doesn't support index.ts imports
See original GitHub issueWhich @angular/* package(s) are the source of the bug?
Don’t known / other
Is this a regression?
No
Description
Hello,
ng test
fails when there are folder imports that use index.ts
file. On the other side, ng build
works ok.
Please provide a link to a minimal reproduction of the bug
https://github.com/lukasmatta/angular-index-import
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 14.0.2
Node: 16.13.1
Package Manager: npm 8.12.2
OS: darwin x64
Angular: 14.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1400.2
@angular-devkit/build-angular 14.0.2
@angular-devkit/core 14.0.2
@angular-devkit/schematics 14.0.2
@schematics/angular 14.0.2
rxjs 7.5.5
typescript 4.7.4
Anything else?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
ng test fails Module not found: Error: Can't resolve 'fs' #8357
I had the same error after running ng test that went away after removing import 'jasmine'; from *.spec.ts files.
Read more >@angular/material/index.d.ts' is not a module - Stack Overflow
I have a material.module.ts file that I import / export all the material ... not used by my modules, but it doesn't seem...
Read more >Launching your app with a root module - Angular
When you use the Angular CLI command ng new to generate an app, the default AppModule looks like the following: content_copy /* JavaScript...
Read more >The Best Way To Architect Your Angular Libraries
ts will be used to export all the entities (like modules, components, services or directives) that belong to the particular sub-entry. Currently we...
Read more >Configuring Jest
To read TypeScript configuration files Jest requires ts-node . ... This option tells Jest that all imported modules in your tests should be ......
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
That is most likely due to a cycle in your code:
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.