-
Notifications
You must be signed in to change notification settings - Fork 654
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
consider using bundledDependencies
instead of shrinkwrap
#636
Comments
@othiym23 thanks for bringing this up. @tlancina and I have been tossing the idea around of removing the shrinkwrapping. I'm tackling this right now, as we're having more issues with it. I do have a few questions for you: We have a few requirements on natively built modules. Should we include those into bundledDependencies to be included in the tarball? Or should those be excluded? For example, node-sass uses the C++ addons. If I bundle it on OSX, will Windows users pull that same version? Would I need to have a P.s: |
I'm guessing this issue is related to this? npm/npm#8196 |
Is there a workaround outside of using npm? I can get cordova to install but ionic fails every time. |
@jmsims2 I cloned this repo locally and deleted the shrinkwrap file and then used npm install as a workaround. |
When I use the command this error appears npm ERR! Unexpected end of JSON input while parsing near '... "_ hasShrinkwrap": false', could you help me? |
Hi there! I'm one of the maintainers of npm, and I've been fielding enough requests for help getting ionic installed that it's become a reasonably significant percentage of our support traffic. One thing I've noticed is that ionic uses shrinkwrap. This is great for getting everybody using the same versions of all of Ionic's components, but it does make installing tough at times, because due to how shrinkwrap works, it ends up bypassing the npm cache and redownloading every package mentioned in the shrinkwrap each time
npm install
is run. If users have any issues with their network, or something gets sticky with npm's CDN, the whole install can fail, forcing them to start over again.The most useful way to work around this would be to do what
ember-cli
and a few other more complicated packages do (including npm, which does this for bootstrapping reasons), and make sure all the dependencies are also included inbundleDependencies
. This will result in one enormous package tarball to download and install, but it should actually be much more likely to be successful for the average user to install. This may not be an option if the resulting tarball is much over ~100MiB, but since an unpacked Ionic install only uses ~131MiB, it should be fine.I know this might seem a little out of left field, but I do want to help the Ionic community, and this seems like the simplest thing you can do to make the experience much better for your users. There are some changes underway to the npm CLI that should address the same underlying issues with large, complex npm installs being fragile, but those are still in the design stage, and probably won't be ready for months. Let me know if there's anything I can do to help, if this sounds like something you think is worth doing. Thanks for your time!
The text was updated successfully, but these errors were encountered: