Skip to content

[Bug]: platform-browser-dynamic #18

Description

@LukasMachetanz

Checklist

  • I have searched the existing issues and have not found a duplicate
  • I have read the README and documentation and have not found a solution
  • I agree to follow the OpenNG Foundation Code of Conduct

What happened?

Is this issue really resolved? When I delete the deprecated package @angular/platform-browser-dynamic from our project tests using spectator fail.

ERROR] Could not resolve "@angular/platform-browser-dynamic/testing"
      
node_modules/@openng/spectator/fesm2022/openng-spectator.mjs:7:44:
7 │ ...icTestingModule } from '@angular/platform-browser-dynamic/testing';                                                                                                                                                                                                                                      
      
You can mark the path "@angular/platform-browser-dynamic/testing" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

Is this expected? Do I have to follow the suggested solution? I would rather expect that spectator works without @angular/platform-browser-dynamic out of the box.

Any help appreciated.

Steps to reproduce

  1. Remove @angular/platform-browser-dynamic
  2. Run tests

Expected behavior

I would expect that spectator works without having the deprecated package @angular/platform-browser-dynamic included in package.json.

Actual behavior

Tests fail with:

ERROR] Could not resolve "@angular/platform-browser-dynamic/testing"
      
node_modules/@openng/spectator/fesm2022/openng-spectator.mjs:7:44:
7 │ ...icTestingModule } from '@angular/platform-browser-dynamic/testing';                                                                                                                                                                                                                                      
      
You can mark the path "@angular/platform-browser-dynamic/testing" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

Minimal reproduction

https://github.com/openng-org/spectator/issues

Library version

1.0.1

Angular version

22.1.3

Node version

26.7.0

Package manager

npm

Browser(s)

Chrome

Environment details

Angular application setup

None

Angular context

  • SSR (Server-Side Rendering) is involved
  • Zoneless change detection is enabled

Relevant log output

Screenshots

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions