Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ng2-select to work with ng4 #738

Closed
mircowidmer opened this issue Mar 29, 2017 · 17 comments
Closed

Allow ng2-select to work with ng4 #738

mircowidmer opened this issue Mar 29, 2017 · 17 comments

Comments

@mircowidmer
Copy link

mircowidmer commented Mar 29, 2017

When I try to npm install an ng4 project (4.0.0) that is using ng2-select, I get the following warning:

[email protected] requires a peer of @angular/common@^2.3.0 but none was installed.
[email protected] requires a peer of @angular/core@^2.3.0 but none was installed.

I believe that is because the peer dependencies of version 1.2.0 of ng2-select are locked to 2.x.x, see package.json:

"peerDependencies": {
    "@angular/common": "^2.3.0",
    "@angular/core": "^2.3.0"
  },

It should also allow to be usable with ng4 without producing warnings during npm install.

@mouradhamoud
Copy link

npm shrinkwrap will fail too

@ahmadyaqob
Copy link

─ UNMET PEER DEPENDENCY @angular/[email protected] invalid
├── UNMET PEER DEPENDENCY @angular/[email protected] invalid
Same issue here!i've switched to angular the dependencies to version "2.." but still have the same issue

@Scipionh
Copy link

Scipionh commented Apr 4, 2017

I am afraid this may never be done, but that's a must if this library is to last a bit longer

@nomanbiniqbal
Copy link

any news

@Scipionh
Copy link

This lib is dead, let's move on.

roolebo added a commit to roolebo/ng2-select-compat that referenced this issue Apr 16, 2017
@roolebo
Copy link

roolebo commented Apr 16, 2017

A forked version with relaxed dependencies can be used for now:

npm install --save https://github.com/roolebo/ng2-select/tarball/0e798ad4f04a0efccd03a757e3cc587e84906f46

It can be installed on angular 4.x

@roolebo
Copy link

roolebo commented Apr 16, 2017

Ohh. It seems that the fork should also be rebuilt

@roolebo
Copy link

roolebo commented Apr 17, 2017

UPD: npm install --save ng2-select-compat installs exact copy of [email protected] with relaxed dependencies
It can be used as drop-in replacement of ng2-select:

import { SelectModule } from 'ng2-select-compat'

@bymeftun
Copy link

@mouradhamoud
Copy link

Using npm version 5 solved the version locking issue. The new npm generates a package-lock.json file so no more npm shrinkwrap !

@samuelkavin
Copy link

samuelkavin commented Aug 24, 2017

I still have sasme error even using ng2-select-compat. Any solution?
Here is my package.json
"@angular-generic-table/core": "^4.4.1", "@angular/animations": "^4.3.4", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0",

@filipefreitas82
Copy link

@mouradhamoud I'm using npm 5 and still get the same problem. How does it work for you?

@mouradhamoud
Copy link

@filipefreitas82 I have the line "ng2-select": "1.2.0" in my package.json file.

The generated package-lock.json contains:

"ng2-select": {
  "version": "1.2.0",
  "resolved": "https://registry.npmjs.org/ng2-select/-/ng2-select-1.2.0.tgz",
  "integrity": "sha1-XJBhi/++MqzF7hwSjIhUcFm08Rw="
},

I didn't need to do anything special.

Extra details: I'm using npm v 5.3.0 and angular v 4.3.2, I hope this will help.

@filipefreitas82
Copy link

@mouradhamoud thanks. As it turns out my problem was related to other packages (ngx-bootstrap and ngx-uploader).

Still I'm using npm 5.3.0 with angular 4.3.6 and I'm getting the same warnings:

[email protected] requires a peer of @angular/common@^2.3.0 but none was installed.
[email protected] requires a peer of @angular/core@^2.3.0 but none was installed.

My package-lock.json also has the same as yours:

"ng2-select": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/ng2-select/-/ng2-select-1.2.0.tgz",
"integrity": "sha1-XJBhi/++MqzF7hwSjIhUcFm08Rw="
},

@mouradhamoud
Copy link

@filipefreitas82 Nice, I have the warnings too but this doesn't prevent the generation of the lock file.

@chan71
Copy link

chan71 commented Oct 7, 2017

Is ng2-select 1.2.0 going to support angular 4 at some point? I'm getting the warning as stated here with node 8.1.2 and @angular/cli: 1.3.2 and angular 4.2.4.

@optimistex
Copy link

New life of the component in the fork: https://github.com/optimistex/ng2-select-ex
And currently, it is supported with Angular 5

@mircowidmer mircowidmer closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests