How do i fix this displaying problem with my angular app

Discussão em 'Angular' iniciado por Ivan Drusanov, Fevereiro 12, 2025.

  1. When i type ng serve and go to the page it starts to load and after a while i get this error:

    TypeError [ERR_INVALID_ARG_TYPE]: The "str" argument must be of type string. Received undefined
    at stripVTControlCharacters (node:internal/util/inspect:2480:3)
    at prepareError (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:20268:14)
    at logError (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:20299:10)
    at viteErrorMiddleware (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:20304:5)
    at call (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:22619:7)
    at next (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:22567:5)
    at call (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:22632:3)
    at next (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:22567:5)
    at call (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:22632:3)
    at next (file:///C:/Users/PC/Desktop/portfolio/node_modules/@angular/build/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:22567:5)


    i have tried everything from npm update npm install to creating the project over and over and i can't find a fix. When i delete and create the project again and i try to start it is good and the next moment i try to change something it comes back up. Also when i run it with ng serve --verbose it give me these errors

    This "import" expression will not be bundled because the argument is not a string literal [unsupported-dynamic-import]

    src/app/app.component.ts:17:102:
    17 │ (() => { const id = "src%2Fapp%2Fapp.component.ts%40AppComponent"; function AppComponent_HmrLoad(t) { import(/* @vite-ignore */
    ╵ ~~~~~~


    ● [DEBUG] This "import" expression will not be bundled because the argument is not a string literal [unsupported-dynamic-import]

    src/app/app.component.ts:17:102:
    17 │ (() => { const id = "src%2Fapp%2Fapp.component.ts%40AppComponent"; function AppComponent_HmrLoad(t) { import(/* @vite-ignore */
    ╵ ~~~~~~


    ● [DEBUG] This "import" expression will not be bundled because the argument is not a string literal [unsupported-dynamic-import]

    src/app/typewriter/typewriter.component.ts:63:136:
    63 │ ...d = "src%2Fapp%2Ftypewriter%2Ftypewriter.component.ts%40TypewriterComponent"; function TypewriterComponent_HmrLoad(t) { import(/* @vite-ignore */
    ╵


    ● [DEBUG] This "import" expression will not be bundled because the argument is not a string literal [unsupported-dynamic-import]

    src/app/typewriter/typewriter.component.ts:63:136:
    63 │ ...d = "src%2Fapp%2Ftypewriter%2Ftypewriter.component.ts%40TypewriterComponent"; function TypewriterComponent_HmrLoad(t) { import(/* @vite-ignore */

    Continue reading...

Compartilhe esta Página