Skip to content

Upgrading Angular 12 to 13, facing routing-outlet error in console #30233

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

Closed
1 task done
PreethiHarish18 opened this issue May 2, 2025 · 1 comment
Closed
1 task done

Comments

@PreethiHarish18
Copy link

Command

run

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

Angular 12

Description

Am updating angular 12 to 13 and updated all dependency package to its compatible version. Checked by giving npm outdated, no package is showing the version in red color. When given npm start, application url is getting launched but getting console error related to routing module as mentioned below

Minimal Reproduction

All the routing are correct, added RouterModule in AppModule and AppRoutingModule. Added in app component, added the path correctly in routing module.
Still the routing is not taking place, even it is not navigating to the error page, { path: '**', redirectTo: '/error' }
When i wrote console.log in resolver.ts and appcomponent.ts file, am getting those in console along with the mentioned error

Exception or Error

VM147 core.mjs:14757 NG0304: 'router-outlet' is not a known element:
1. If 'router-outlet' is an Angular component, then verify that it is part of this module.
2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
Console messages
MainAppComponent:constructor() - appcomponent.ts
BaseUrlResolver:resolve() - resolver.ts

Your Environment

ng "version"
     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
Angular CLI: 13.3.11
Node: 14.15.5
Package Manager: npm 6.14.18
OS: win32 x64

Anything else relevant?

I tried the same with node version 16.20.2 with npm 8.19.4, but getting peer dependency error for webpack-dev-server and typescript. When i try to update that, its throwing error as circular dependency, if am updating typescript, its throwing error for webpack-dev, so if am trying to update webpack, its throwing error on typescript

@JeanMeche
Copy link
Member

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

@JeanMeche JeanMeche closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants