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.

Value at position x in the NgModule.imports of AppModule is not a reference: [object Object]

See original GitHub issue

Summary

I’m submitting a:

  • bug report
  • feature request
  • question / support request
  • other

Description

Upgradeing to Angular9 and using RecaptchaModule.forRoot() breaks the app. Remove the .forRoot() fixes this. However, this wasent very clear from the insane amounts of errors that came. Others might run into this issue, and this is why i decided to post it here.

.forRoot() was once required to setup https://github.com/DethAriel/ng-recaptcha/commit/7fb97fb04049dd058a2394ecef297dac7c6104d1#diff-04c6e90faac2675aa89e2176d2eec7d8

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Abubarrettcommented, Feb 12, 2020

removing .forRoot() doesn’t fix the issue it just lets the app compile but i still get an error when the app is running Screen Shot 2020-02-12 at 10 06 08

1reaction
Hassan-Moincommented, Feb 11, 2020

+1. Got me stuck in update to Angular 9, when I was running ng build --prod possibly due to AOT or buildOptimizer. ng build or ng serve worked as it should. After countless iterations of removing modules, I found out that ng-recaptcha was the issue. Removed it, my project build correctly. Stumbled upon this issue, added the module back and removed .forRoot() and this fixed the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9: Value at position X in the NgModule.imports is ...
The text of the warning seems explaining exactly the compilation error, where the position (2 in this case) is out of range of...
Read more >
Value at position 6 in the NgModule.imports of AppModule ...
The problem is in your AppModule not ApiModule . What is the 6th/7th position in the imports property of AppModule ?
Read more >
value at position 1 in the ngmodule.declarations of ...
imports of AppModule is not a class Value is a reference to 'NgModule'. 4510 export declare const NgModule: ...
Read more >
NgModule FAQ
The "x" class isn't visible to other modules until you add it to the exports list. What should I import?link. Import NgModules whose...
Read more >
Angular Modules and NgModule - Complete Guide
In this post, we are going to do an introduction to Angular Modularity (the NgModule functionality) and understand why it enables several ...
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