-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng test fails in angular 9 #17235
Comments
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information. If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template. |
Hi @alan-agius4 , can you please let me know if you need any missing information. it complains about the below error in core.js, which is kinda nonsense, as I have done already, about what the error is saying. for e.g. I ran ng add @angular/localize already, the import is there in the polyfills.ts, but somehow while running the ng test, it goes doen to the ng bootstrap lib which uses and i18n, then all my application specific test fails, because it throws below error. core.js:47866 Uncaught Error: It looks like your application or one of its dependencies is using i18n. |
@debender495 - the issue was closed because you did not provide a way for use to reproduce the error. Just pasting the error message gives us very little to get started with in order to debug the issue. I note from the error log that this is being thrown inside a 3rd party library (ng-bootstrap) which has been compiled by ngcc. I guess/believe that this library contains components that use Now, But from the look of the error stack, I wonder if |
I did the following and was not able to reproduce your error:
I then added the ng-bootstrap calendar component (which uses i18n) to the app.module.ts: import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {NgbDatepickerModule} from '@ng-bootstrap/ng-bootstrap';
import { AppComponent } from './app.component';
import { FormsModule } from '@angular/forms';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
NgbDatepickerModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { } app.component.html:
Running
Now running |
Here is my reproduction: https://github.com/petebacondarwin/ng-boostrap-test-angular-cli-issue-17235 |
@petebacondarwin, thanks for looking into this and putting up a repro. @debender495, the issue was closed because indeed you didn’t provide any enough information for us to take action. At the time that this issue was closed the issue template was blank. |
Hi @debender495, can you please update the reproduction provided above by @petebacondarwin (#17235 (comment)) and show case the error that you are experiencing? Unfortunately, we still can't reproduce the problem. Thanks. |
Thank you for the response, I am cheking at my end, and trying to check/compare with the repo shared by @petebacondarwin. i will update shortly, kindly do not close this immediately, Rg, |
Dear @alan-agius4 and @petebacondarwin , @alan-agius4 Please close the issue Thank you guys, |
Glad you are back up and running! |
Well, for any future visitors to this issue, my project configuration is, I had seperate tsconfig files for the schematic adds an import statement for @angular/localize to polyfills.ts that will look something like this: content_copy
content_copy but not in the polyfills.headless.ts as mentioned in my tsconfig.spec.json file, This is configured in angular.json in the test section ==
|
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?
Yes, the previous version in which this bug was not present was: v7Description
A clear and concise description of the problem...This issue complains about below in the polyfills.ts
This is added after running the command ng add "@angular/localize"
Seems like it cannot find this import of the polyfills when I run, ng test. is there a way or options that can be added in the command to provide this localize configuration explicitly.
🔬 Minimal Reproduction
Simple steps to reproduce this bug.
below is the configuration , I am having after the the upgrade to angular 9.
tsconfig.app.json
tsconfig.json
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: