-
Notifications
You must be signed in to change notification settings - Fork 12k
ng build Module not found: Error: Recursion in resolving #18021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @matteobruni, I am unable to replicate the above error with the provided steps. I encountered this following error ERROR in src/app/app.module.ts:5:35 - error TS2307: Cannot find module 'ng-particles/dist/ng-particles' or its corresponding type declarations.
5 import { NgParticlesModule } from 'ng-particles/dist/ng-particles'; Which seems to be related to one of the imports. Which should be replaced with import { NgParticlesModule } from 'ng-particles'; |
Hi @alan-agius4 Sorry I forgot some steps to be done in the root folder
This should build the library for the demo project. The path is correct with the list folder for a workaround with the lerna package management EDIT: I don't know if the Angular wrapper has issues, the build completes without warnings. You can find it in |
I get same issue updating from 9 to 10. Works fine in 9 fails in 10 with error
Package causing problem is a local package referenced in package.json using file - https://docs.npmjs.com/files/package.json#local-paths |
(disable tests until angular/angular-cli#18021 resolved)
(disable tests until angular/angular-cli#18021 resolved)
I'm getting the same issue after upgrading from 9 to 10 this morning. Was working like a champ with 9. Upgraded core, cli, and material, and now i'm getting blasted with these module recursion errors on app build. Library build with ng-packagr is working ok. But ng build on the app gives that for every module the app uses from the local library build. Similar, i think, as @slubowsky. Thanks for jumping on this @alan-agius4 |
|
Same here, problem caused by symlinking node_modules in my build process |
Hit the same issue when upgrading to Version 10. I couldn't find the source of the change between 9 and 10 as the last commit seems to be merged already in 9 in the source BUT I can confirm that symlinks where the root of the issue. The solution for me in the meantime is settting preserveSymlinks to true in angular.json under architect->build/test->options but I don't know if there are specific sideeffects. Would be great if someone with more knowledge could leave an opinion on this. EDIT: An alternative would be to execute ng build/test with the --preserveSymlinks true argument as one would have to add the option to every relevant architect entry afaik. |
Thanks, this is the workaround I was searching. My broken angular project is a demo one so I don't care about side effects for now. |
temporarly fixes issues regarding angular/angular-cli#18021
* fix(client-ng): prevent issue with symlinked modules temporarly(?) fixes issues regarding angular/angular-cli#18021 * fix(client-ng): set preserveSymlinks true for test builds
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
In Angular 9.x it the command was working fine
Description
Build broken in Angular 10.x
🔬 Minimal Reproduction
Project
demo/angular
here https://github.com/matteobruni/tsparticles/tree/dev/demo/angular, if you runyarn build:disabled
you get the error (the script has:disabled
for CI)🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: