Skip to content
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

ReferenceError: Router is not defined error after upgrade from 11.0.9 to 11.1.0 #19853

Closed
vkirienko opened this issue Jan 22, 2021 · 2 comments
Closed

Comments

@vkirienko
Copy link

vkirienko commented Jan 22, 2021

🐞 bug report

Affected Package

"dependencies": {
"@angular/animations": "^11.1.0",
"@angular/common": "^11.1.0",
"@angular/compiler": "^11.1.0",
"@angular/core": "^11.1.0",
"@angular/forms": "^11.1.0",
"@angular/localize": "^11.1.0",
"@angular/platform-browser": "^11.1.0",
"@angular/platform-browser-dynamic": "^11.1.0",
"@angular/router": "^11.1.0",
"@fortawesome/angular-fontawesome": "^0.8.1",
"@fortawesome/fontawesome-free": "^5.15.2",
"@fortawesome/fontawesome-svg-core": "^1.2.34",
"@fortawesome/free-solid-svg-icons": "^5.15.2",
"@microsoft/signalr": "^5.0.2",
"@ng-bootstrap/ng-bootstrap": "^9.0.1",
"@ngneat/until-destroy": "^8.0.3",
"bootstrap": "^4.6.0",
"devextreme": "20.2.5",
"devextreme-angular": "20.2.5",
"error-stack-parser": "^2.0.6",
"file-saver": "^2.0.5",
"rxjs": "^6.6.3",
"stream": "0.0.2",
"tslib": "^2.1.0",
"zone.js": "~0.11.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1101.0",
"@angular/cli": "^11.1.0",
"@angular/compiler-cli": "^11.1.0",
"@angular/language-service": "^11.1.0",
"@types/file-saver": "^2.0.1",
"@types/jasmine": "^3.6.3",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^14.14.22",
"@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.14.0",
"eslint": "^7.18.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~6.0.0",
"karma": "^6.0.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"npm-check-updates": "^11.0.2",
"protractor": "~7.0.0",
"terser": "^5.5.1",
"ts-node": "~9.1.1",
"typescript": "4.1.3",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-sources": "2.2.0"
}

Is this a regression?

Yes, the previous version in which this bug was not present was: 11.0.9

Description

Browser shows error below in console.

🔥 Exception or Error



Uncaught ReferenceError: Router is not defined
    at Module.Y1eN (toolbar.component.ts:21)
    at __webpack_require__ (bootstrap:79)
    at Module.uswQ (add-position-modal.component.ts:25)
    at __webpack_require__ (bootstrap:79)
    at Module.Sy1n (approval-queue.component.ts:16)
    at __webpack_require__ (bootstrap:79)
    at Module.ZAI4 (app.module.ts:1)
    at __webpack_require__ (bootstrap:79)
    at Module.zUnb (grid-resizer.service.ts:7)
    at __webpack_require__ (bootstrap:79)

🌍 Your Environment

Angular Version:


Angular CLI: 11.1.0
Node: 12.16.2
OS: win32 x64

Angular: 11.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Ivy Workspace: Yes

Package                                    Version
--------------------------------------------------------------------
@angular-devkit/architect                  0.1101.0
@angular-devkit/build-angular              0.1101.0
@angular-devkit/core                       11.1.0
@angular-devkit/schematics                 11.1.0
@nguniversal/module-map-ngfactory-loader   8.1.1
@schematics/angular                        11.1.0
@schematics/update                         0.1101.0
rxjs                                       6.6.3
typescript                                 4.1.3
@JoostK JoostK transferred this issue from angular/angular Jan 22, 2021
@vkirienko vkirienko changed the title ReferenceError: Router is not defined error after upgrade from 11.0 to 11.1 ReferenceError: Router is not defined error after upgrade from 11.0.9 to 11.1.0 Jan 22, 2021
@JoostK
Copy link
Member

JoostK commented Jan 22, 2021

Closing as a duplicate of #19839 and #19852, being fixed in #19841.

@JoostK JoostK closed this as completed Jan 22, 2021
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants