Skip to content

After upgrade from Angular 17 to 18: polyfills?.some is not a function #27693

Closed

Description

@cesco69

Which @angular/* package(s) are the source of the bug?

compiler-cli

Is this a regression?

Yes

Description

I have upgrade from Angular 17 to 18 with:

ng update @angular/core@18 @angular/cli@18 --force --allow-dirty
ng update @angular/cdk@18 @angular/material@18 --force --allow-dirty

When I run ng serve

Application bundle generation complete. [30.669 seconds]

Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
An unhandled exception occurred: polyfills?.some is not a function
See "C:\Users\USER~1\AppData\Local\Temp\ng-w1ouV2\angular-errors.log" for further details.

angular-errors.log show:

[error] TypeError: polyfills?.some is not a function
    at isZonelessApp (D:\my-app\frontend\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_@[email protected]_3bg7bdsu3zoaz37rnqvhp7tkye\node_modules\@angular\build\src\tools\esbuild\utils.js:390:24)
    at serveWithVite (D:\my-app\frontend\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_@[email protected]_3bg7bdsu3zoaz37rnqvhp7tkye\node_modules\@angular\build\src\builders\dev-server\vite-server.js:198:234)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

[error] TypeError: polyfills?.some is not a function
    at isZonelessApp (D:\my-app\frontend\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_@[email protected]_3bg7bdsu3zoaz37rnqvhp7tkye\node_modules\@angular\build\src\tools\esbuild\utils.js:390:24)
    at serveWithVite (D:\my-app\frontend\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_@[email protected]_3bg7bdsu3zoaz37rnqvhp7tkye\node_modules\@angular\build\src\builders\dev-server\vite-server.js:198:234)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Please provide the environment you discovered this bug in (run ng version)

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 18.0.0
Node: 20.10.0
Package Manager: pnpm 8.10.5
OS: win32 x64

Angular: 18.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, localize, material, material-date-fns-adapter
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1800.0 (cli-only)
@angular-devkit/build-angular   18.0.0
@angular-devkit/core            18.0.0 (cli-only)
@angular-devkit/schematics      18.0.0 (cli-only)
@schematics/angular             18.0.0 (cli-only)
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.6

Anything else?

No response

Activity

  1. transferred this issue fromangular/angularon May 23, 2024
  2. added a commit that references this issue on May 23, 2024
    9116893
  3. self-assigned this
    on May 23, 2024
  4. added 2 commits that reference this issue on May 23, 2024
    dd06768
    ba70a50
  5. Webaadhi5E commented on May 23, 2024

    @Webaadhi5E
  6. JoostK commented on May 23, 2024

    @JoostK
    Member

    Type 'EnvironmentProviders' is not assignable to type 'Provider'.ts(2322) getting this error after updating to angular 18

    @component({ selector: 'app-sign-up',

    standalone: true,
    
    templateUrl: './sign-up.component.html',
    
    styleUrl: './sign-up.component.scss', 
    

    imports: [CommonModule, RouterLink, RouterLinkActive, ReactiveFormsModule, FormsModule],

    providers: [provideHttpClient(withInterceptorsFromDi())] })
    

    That's unrelated to this issue and am issue with your code: provideHttpClient must be provided as bootstrap provider to bootstrapApplication, including it as a component provider is, and had been, invalid.

  7. angular-automatic-lock-bot commented on Jun 23, 2024

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions