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

RangeError Maximum call stack size exceeded 最大调用堆栈大小超出 #127

Open
deepthan opened this issue Feb 22, 2021 · 0 comments
Open

Comments

@deepthan
Copy link
Owner

core.es5.js:1020 ERROR Error: Uncaught (in promise): RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.preloadConfig (vendor.bundle.js:1)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5802)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.preloadConfig (vendor.bundle.js:1)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5802)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
    at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
    at resolvePromise (zone.js:824)
    at zone.js:876
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425)
    at Object.onInvokeTask (core.es5.js:3881)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424)
    at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:192)
    at drainMicroTaskQueue (zone.js:602)
    at <anonymous>

解决办法: 是不是路由没有在模块里面引入

import { PreviewLoadRouting } from './preview-load.routing';

@NgModule({
  imports: [
    ...
    RouterModule.forChild(PreviewLoadRouting) // 这里要引入,不然会报这个错误
  ]
 
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant