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.

Having transloco-root.module confuses Angular CLI generator

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

When invoking the Angular CLI generator for items that require importing (components/pipes/etc.), we get the error More than one module matches. Use the skip-import option to skip importing the component into the closest module or use the module option to specify a module. Manually specifying --module app.module is required.

Expected behavior

The Angular CLI generator should work as expected. This also breaks Nx generator, which uses Angular CLI underneath.

Minimal reproduction of the problem with instructions

  1. Create a new project using Angular CLI (ng new hello)
  2. Add Transloco as mentioned in the docs (cd hello && ng add @ngneat/transloco)
  3. Generate a component (ng g c foo)

Environment


Angular version: 10.0.6

 
For Tooling issues:
- Node version: 10  
- Platform:  Mac 


Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
itayodcommented, Jul 30, 2020

Do you know why the CLI doesn’t get confused with app-routing.module? If it’s a naming convention or a config in angular.json I think we could leverage that.

Sure, they actually handle it hard codedly by specifically ignoring -routing.module files 😃

1reaction
itayodcommented, Jul 29, 2020

@karmasakshi in order to test it you can run build the schematics or run schematics:watch for dev, then create a test project and run npm link transloco-schematics then you will be able to run the add command as following: ng g transloco-schematics:init

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation | Transloco Angular i18n - GitHub Pages
Install the library using Angular CLI: ... Next, it will create a new file, transloco-root.module.ts which exposes an Angular's module with a default ......
Read more >
How to avoid adding transloco root module to ... - Stack Overflow
I'm using the transloco for my Nx project. I have multiple apps and libraries in my Nx project. For one of the project...
Read more >
Angular i18n: internationalization & localization with examples
Angular I18n uses the built-in module for internationalization. Learn how to set up I18n, perform translations, and deploy the app.
Read more >
User Interface Licenses - SimplySNAP Help Site
find-yarn-workspace-root. firebase. forever-agent. fuse.js ... @angular-eslint/bundled-angular-compiler ... @babel/plugin-proposal-async-generator-functions.
Read more >
Not an Angular CLI Project - Genuitec
Hi, just purchased Angular IDE and having some problems debugging my ... I created an Angular CLI project using a project generator from ......
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