Skip to content

Angular 12 compatibility #1761

@StefanSchoof

Description

@StefanSchoof

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/eclipsesource/jsonforms-angular-seed.git
  2. cd jsonforms-angular-seed
  3. ng update @angular/core@12 @angular/cli@12
  4. get error: "Package "@jsonforms/angular-material" has an incompatible peer dependency to "zone.js" (requires "^0.10.2", would install "0.11.4").
    × Migration failed: Incompatible peer dependencies found.
    Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
    You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later."
  5. ng update @angular/core@12 @angular/cli@12 --force (works without an error)
  6. npm start
  7. Get the error:
Did you mean './http'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (C:/Users/SSchoof/source/github/jsonforms-angular-seed, node_modules). 
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory 
too.

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
        - install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "http": false }

./node_modules/json-schema-ref-parser/lib/resolvers/http.js:4:14-30 - Error: Module not found: Error: Can't resolve 'https' in 'C:\Users\SSchoof\source\github\jsonforms-angular-seed\node_modules\json-schema-ref-parser\lib\resolvers'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
        - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "https": false }

Expected behavior
jsonforms is working with latest released angular version

Screenshots
n/a

Browser (please complete the following information):
n/a

Used Setup (please complete the following information):

  • Framework: angular
  • RendererSet: material

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions