Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

missing peerDependencies prevent one from creating shrinkwrap in npm 3 #12909

Closed
mgol opened this issue May 31, 2016 · 34 comments
Closed

missing peerDependencies prevent one from creating shrinkwrap in npm 3 #12909

mgol opened this issue May 31, 2016 · 34 comments

Comments

@mgol
Copy link

mgol commented May 31, 2016

I thought npm 3 was supposed to solve all peerDependencies problems by always warning if they're missing but otherwise not breaking. Unfortunately, even with npm 3.9.3, npm shrinkwrap will still fail if a peerDependency is missing. For example, with the following package.json:

{
  "name": "test",
  "dependencies": {
    "jquery-placeholder": "2.3.1"
  }
}

Running npm install & then npm shrinkwrap results in an error:

npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/mgol/.nvm/versions/node/v6.2.0/bin/node" "/Users/mgol/.nvm/versions/node/v6.2.0/bin/npm" "shrinkwrap"
npm ERR! node v6.2.0
npm ERR! npm  v3.9.3

npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! peer invalid: jquery@*, required by [email protected]
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mgol/_/npm-debug.log

and no shrinkwrap is created.

I'd expect npm to only warn in such a case as well.

Is there any way to generate shrinkwrap with missing peerDependencies in npm 3?

@lmaze
Copy link

lmaze commented Jun 23, 2016

Same problem here !
Is there a way to make the shrinkwrap work with the peerDependencies ?

@Vaccano
Copy link

Vaccano commented Jul 28, 2016

I will add a 1 to this. It should just be a warning.

I need a workaround now....

@tomalex0
Copy link

is there any workaround, for this scenario

@legodude17
Copy link
Contributor

The best would be to just install the missing dep.

@z0d14c
Copy link

z0d14c commented Mar 27, 2017

i have a package where a listed dependency is out of date, and we are using a more up-to-date version of that dependency. unfortunately shrinkwrap gives us trouble and wants us to list the more out-of-date version in our package.json. would love to be able to ignore the requirement somehow.

@iammikecohen
Copy link

I'm seeing this with a package that lists Angular 2 as a peer dependency when I use Angular 4. I've tried updating the dependency of the package to "@angular/core": "^2.0.0 <=4.0.2" but that errors out as well.

@mgol
Copy link
Author

mgol commented Apr 18, 2017

@iammikecohen "@angular/core": "^2.0.0 <=4.0.2" is effectively the same as "@angular/core": "^2.0.0" or "@angular/core": ">=2.0.0 <3" so you're using Angular 2, not 4 then.

https://semver.npmjs.com/ can help you to figure out semver ranges.

@iammikecohen
Copy link

@mgol Thank you, I should have been using "@angular/core": "^2.2.0 || ~4.0.0"

@npm-robot
Copy link

We're closing this issue as it has gone seven days without activity and without being labeled. If we haven't even labeled in issue in seven days then we're unlikely to ever read it.

If you are still experiencing the issue that led to you opening this or this is a feature request you're still interested in then we encourage you to open a new issue. If this was a support issue, you may be better served by joining package.communty and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

@Rovack
Copy link

Rovack commented Jul 5, 2017

@mgol How did you end up solving this?

@mgol
Copy link
Author

mgol commented Jul 5, 2017

@Rovack I haven't. The only projects in which I used npm shrinkwrap are non-public company projects that have since migrated to Yarn.

I haven't tested it recently but I assume the issue is still there.

@Rovack
Copy link

Rovack commented Jul 5, 2017

It definitely is. Quite surprising, then, that all issues opened around this (e.g this and this) seem to have been closed with no resolution.
Perhaps the assumption is that no projects use shrinkwrap anymore...

@tuxracer
Copy link

tuxracer commented Jul 5, 2017

Issue is definitely still happening shrinkwrap is still enforcing peerDependencies that are only a warning on install

@vprasanth
Copy link

vprasanth commented Jul 13, 2017

I'm going to bump this so the dumbass npm issue bot doesn't auto close it. Using npm 4.6.1 and I can't shrinkwrap since it doesn't ignore the peerDependency warning. It's isn't so that I'm missing the dependency even it's just the package I'm using has stupid strict peerDependency versions.

@diegopamio
Copy link

I'm also having issues to shrinkwrap when peer dependencies of third parties doesn't get fullfilled.

@praveen16
Copy link

1 on the issue. npm shrinkwrap fails with invalid peer dependency on transitive dependencies

@bobpf
Copy link

bobpf commented Aug 22, 2017

Having the same issues with npm shrinkwrap

@httpete
Copy link

httpete commented Sep 14, 2017

same.

npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! peer invalid: popper.js@^1.11.0, required by [email protected]
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! c:\Users\peters1\bench\um_kb\npm-debug.log

@garethtalty
Copy link

1

npm ERR! Linux 3.13.0-129-generic
npm ERR! argv "/opt/nvm/versions/node/v6.10.3/bin/node" "/opt/nvm/versions/node/v6.10.3/bin/npm" "shrinkwrap"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10

npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! peer invalid: webpack@^1.12.13 || ^2.1.0-beta.15, required by [email protected]
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/gousto2frontend/src/npm-debug.log

@ghost
Copy link

ghost commented Oct 7, 2017

Hi guys, I am facing the same problem as @garethtalty .
Someone knows how to fix this issue?

@eswarreddy43
Copy link

1

3 similar comments
@jesseseligman
Copy link

1

@garyjohnson
Copy link

1

@mlnj
Copy link

mlnj commented Dec 12, 2017

1

@STEVEOO6
Copy link

STEVEOO6 commented Jan 9, 2018

1 Exactly the same issue as @httpete

@artyomtrityak
Copy link

1

8 similar comments
@totorean
Copy link

1

@derchirurg
Copy link

1

@Mac-lp3
Copy link

Mac-lp3 commented May 15, 2018

1

@dillonburns
Copy link

1

@raulgg
Copy link

raulgg commented May 17, 2018

1

@envynoiz
Copy link

1

@Jones-S
Copy link

Jones-S commented Jun 9, 2018

1

@nassia
Copy link

nassia commented Jul 5, 2018

1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests