question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install on Angular 11 - peer dependencies and not working

See original GitHub issue

I’m submitting a …

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior

I am attempting to install ngx-datatables in a project running Angular 11.

npm install @swimlane/ngx-datatable

After install I get the following warnings:

npm WARN @swimlane/ngx-datatable@19.0.0 requires a peer of @angular/common@^11.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN @swimlane/ngx-datatable@19.0.0 requires a peer of @angular/core@^11.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN @swimlane/ngx-datatable@19.0.0 requires a peer of @angular/platform-browser@^11.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN @swimlane/ngx-datatable@19.0.0 requires a peer of rxjs@^6.6.3 but none is installed. You must install peer dependencies yourself.

My packages.json has the following:

"@angular/common": "~11.2.6",
"@angular/core": "~11.2.6",
"@angular/platform-browser": "~11.2.6",
"rxjs": "~6.6.0",

When I add the import to app.module.ts and run my app, I get the following errors:

[error] Error: The target entry-point "@swimlane/ngx-datatable" has missing dependencies:
 - @angular/core
 - @angular/common
 - rxjs
 - rxjs/operators

So why am I having an issue?

Expected behavior

No warnings, and the project runs

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Would like to have a working program.

Please tell us about your environment:

Windows 10, Visual Studio 2019, Angular 11

Angular CLI: 11.2.6 Node: 14.16.0 OS: win32 x64

Angular: 11.2.7 … animations, common, compiler, compiler-cli, core, forms … localize, platform-browser, platform-browser-dynamic, router Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.1102.6 @angular-devkit/build-angular 0.1102.6 @angular-devkit/core 11.2.6 @angular-devkit/schematics 11.2.6 @angular/cli 11.2.6 @schematics/angular 11.2.6

  • Browser Chrome

  • Language: all

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
plecoscommented, Apr 1, 2021

I updated rxjs to 6.6.7, and so that warning went away. Still left with the other 3.

0reactions
Quangdung1996commented, Feb 28, 2022

I updated rxjs to 6.6.7, and so that warning went away. Still left with the other 3.

thanks you, i fixed issue it

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install npm peer dependencies automatically?
Older Answer. The automatic install of peer dependencies was explicitly removed with npm 3, as it cause more problems than it tried to...
Read more >
Unable to resolve dependency tree error in Angular while ...
To fix Unable to resolve dependency tree error in Angular while installing `npm` packages follow the below steps. 1. Run `npm install --save ......
Read more >
you must install peer dependencies yourself Code Example
You must install peer dependencies yourself. npm WARN karma-jasmine-html-reporter@1.5.4 requires a peer of jasmine-core@>=3.5 but none is installed.
Read more >
you must install peer dependencies yourself - Kodlogs.net
Simply run npm instal on the required dependencies, then try to instal the main one again. When the dependencies of one or more...
Read more >
Workspace npm dependencies - Angular
You can download and install these npm packages by using the npm CLI ... in the dependencies section of package.json are essential to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found