Skip to content

Could not resolve "zone.js/node" #27449

@its-dibo

Description

@its-dibo

Command

build

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

17

Description

I'm using Angular v17 and I got this error when building the app


✘ [ERROR] Could not resolve "zone.js/node"

    angular:polyfills-server:angular:polyfills-server:1:7:
      1 │ import 'zone.js/node';
        ╵        ~~~~~~~~~~~~~~

  You can mark the path "zone.js/node" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

I see this comment

There is likely a pnp.cjs file on your computer.

but I searched for such a file (also .pnp.cjs), but there is no such a file in the whole system at all

Minimal Reproduction

.

Exception or Error

✘ [ERROR] Could not resolve "zone.js/node"

    angular:polyfills-server:angular:polyfills-server:1:7:
      1 │ import 'zone.js/node';
        ╵        ~~~~~~~~~~~~~~

  You can mark the path "zone.js/node" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.


### Your Environment

```text
Angular CLI: 17.2.3
Node: 20.10.0
Package Manager: yarn 1.22.22
OS: linux x64

Angular: undefined
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1702.3
@angular-devkit/core         17.2.3
@angular-devkit/schematics   17.2.3
@schematics/angular          17.2.3
rxjs                         7.8.1

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions