incompatible with angular >= 6.0.0
See original GitHub issueIssue Description
Subject of the issue
Because json-schema-ref-parser requires node http & https, it cannot be used in Angular applications that use angular-cli >= 6.0.0
See this comment from angular-cli: angular/angular-cli#9827 (comment)
Your environment
angular>= 6.0
Expected behavior
I can use json-schema-ref-parser in my app and ng serve does not fail
Actual behavior
ng serve fails with
ERROR in ./node_modules/json-schema-ref-parser/lib/resolvers/http.js
Module not found: Error: Can't resolve 'http' in '/Users/web/container-web/node_modules/json-schema-ref-parser/lib/resolvers'
ERROR in ./node_modules/json-schema-ref-parser/lib/resolvers/http.js
Module not found: Error: Can't resolve 'https' in '/Users/web/container-web/node_modules/json-schema-ref-parser/lib/resolvers'
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top Results From Across the Web
npm - When upgrading Angular 5 to 6, I get incompatible peer ...
ng update @angular/core Package "@angular/flex-layout" has an incompatible peer dependency to "rxjs" (requires "^5.5.0", would install "6.2.0").
Read more >ng upgrade: incompatible peer dependency error prevents ...
Try upgrading the Angular dependencies, using for instance ng update @angular/core . I already performed the @angular/cli upgrade command which ...
Read more >Upgrade Angular App to latest version - Medium
Package "@angular/fire" has an incompatible peer dependency to "@angular/common" (requires ">=6.0.0 <8" (extended), would install "11.1.1").
Read more >could not resolve dependency: npm err! peer @angular/core ...
When I try to update @angular/cdk or other packages I usually get a message saying the dependencies are incompatible (see error block).
Read more >Angular Update Guide
We are deprecating support for @angular/platform-webworker , as it has been incompatible with the CLI. Running Angular's rendering architecture in a web ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i got it working, add this to package.json & reinstall:
"browser": { "http": false, "https": false }
and add this to polyfill.ts
For those who don’t require resolution of external references, it shouldn’t be a requirement at all to load any http module, which causes needless bundle bloat. It should be optional.