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

Mountebank is not shrinkwrap compatible #120

Closed
kutzi opened this issue Jan 11, 2016 · 5 comments
Closed

Mountebank is not shrinkwrap compatible #120

kutzi opened this issue Jan 11, 2016 · 5 comments
Projects
Milestone

Comments

@kutzi
Copy link

kutzi commented Jan 11, 2016

When I add mountebank as dev dependency to my project, I cannot shrinkwrap the dependencies anymore.

i.e.

] npm shrinkwrap --dev
(works fine)
] npm install mountebank --save-dev
] npm shrinkwrap --dev
npm ERR! Error: Problems were encountered
npm ERR! Please correct and try again.
npm ERR! extraneous: abab@1.0.1 /home/ckutz/rwd/cara-boot/node_modules/mountebank/node_modules/abab
npm ERR! extraneous: acorn-globals@1.0.9 /home/ckutz/rwd/cara-boot/node_modules/mountebank/node_modules/acorn-globals
npm ERR! extraneous: browser-request@0.3.3 /home/ckutz/rwd/cara-boot/node_modules/mountebank/node_modules/browser-request
npm ERR! extraneous: coffee-script@1.3.3 /home/ckutz/rwd/cara-boot/node_modules/mountebank/node_modules/coffee-script
...

bbyars added a commit to bbyars/grunt-mountebank that referenced this issue Jan 17, 2016
bbyars added a commit to bbyars/grunt-mountebank that referenced this issue Jan 17, 2016
@bbyars
Copy link
Owner

bbyars commented Jan 17, 2016

Thanks for reporting. Do you have a project I can clone to test? I'm unable to reproduce with grunt-mountebank (https://github.com/bbyars/grunt-mountebank). The shrinkwrap file, including mountebank, is here:
https://github.com/bbyars/grunt-mountebank/blob/master/npm-shrinkwrap.json
-Brandon

@kutzi
Copy link
Author

kutzi commented Jan 22, 2016

I can reproduce it with this example: https://github.com/kutzi/mountebank-shrinkwrap

@akalman
Copy link

akalman commented May 5, 2016

This is actually a npm issue, not a bug in mountebank. Mountebank is published using npm v3, which modifies the behavior of where npm dependencies are installed. npm v2 does not expect this, and will throw errors because of it when trying to shrinkwrap. Upgrading to npm v3 solves this issue.

If for some reason you are stuck on npm v2, there is an only moderately inconvenient workaround. Add all of mountebanks top level dependencies to your own package.json. Then, between npm install and npm shrinkwrap, delete the node_modules/mountebank/node_modules folder. This workaround works for grunt-mountebank, if you are using that as well.

For reference, upgrading to npm v3 only solved the issue for me if my version of mountebank is exactly 1.5.1. I still encountered problems for other versions (the problem varied by version) that I did not try to solve.

@bbyars
Copy link
Owner

bbyars commented May 5, 2016

Adam - thanks for the explanation. I'll add some docs on the next release
to this effect.
-Brandon

On Thu, May 5, 2016 at 11:20 AM, Adam Kalman notifications@github.com
wrote:

This is actually a npm issue, not a bug in mountebank. Mountebank is
published using npm v3, which modifies the behavior of where npm
dependencies are installed. npm v2 does not expect this, and will throw
errors because of it when trying to shrinkwrap. Upgrading to npm v3 solves
this issue.

If for some reason you are stuck on npm v2, there is an only moderately
inconvenient workaround. Add all of mountebanks top level dependencies
https://github.com/bbyars/mountebank/blob/master/package.json#L60-L76
to your own package.json. Then, between npm install and npm shrinkwrap,
delete the node_modules/mountebank/node_modules folder. This workaround
works for grunt-mountebank, if you are using that as well.

For reference, upgrading to npm v3 only solved the issue for me if my
version of mountebank is exactly 1.5.1. I still encountered problems for
other versions (the problem varied by version) that I did not try to solve.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#120 (comment)

@delta62
Copy link

delta62 commented Jan 17, 2017

I just tried creating an NPM shrinkwrap file using npm 3 and I had this issue as well. Similar errors about extraneous packages.

  • npm: 3.10.9
  • mountebank: 1.8.0

@bbyars bbyars added this to TODO in v1.9.0 Jan 31, 2017
@bbyars bbyars added this to the v1.9.0 milestone Feb 9, 2017
@bbyars bbyars moved this from TODO to In Progress in v1.9.0 Feb 26, 2017
@bbyars bbyars closed this as completed Feb 26, 2017
@bbyars bbyars moved this from In Progress to Done in v1.9.0 Feb 26, 2017
bbyars added a commit that referenced this issue Feb 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

4 participants