Closed cyberixae closed 7 years ago
I believe the problem is somehow related to the high water mark of 16 items in Node streams.
I created an example project for testing. See https://github.com/cyberixae/gulp-install-test
@cyberixae it is related to high water mark of 16
, gulp-install
uses through2
#L30 in object-mode which sets the hwm to 16 for the default.. the reason you cannot process more than 17 files is because you are adding files readable part of through2
module and its hitting the buffer limit. based on your test repo you need to drain
the readable part by doing something like pipe(install()).pipe(...)
then you can process more than aforementioned file limit
Actually, we ended up using the Serverless AutoInstall Plugin, so this bug thread is no longer relevant for me. The plugin can be found at https://www.npmjs.com/package/serverless-plugin-autoinstall if someone else has the same use case.
Hi, I have a similar issue, in my case it fails silently for versions 0.5.0 and 0.6.0 but i do not have 16 package.json, the problem is that I am not using Serverless so I cannot avoid the problem so easily, surprisingly for me, If i use gulp-install 0.4.0 it works like a charm...
Off course I can avoid the problem not using gulp-install and executing the command in another kind of fashion like var child = spawn('npm', ['install'], {cwd: process.cwd()}); but i was really wanting to do it the 'gulp-way'. But now that i know it's an open issue maybe I will try the lousy solution until someone gives more info about this cos I cannot get stuck in a minor thing like this.
Sorry for the great delay! A fix for this is on its way...
I am working on a Serverless project that has lots of separately deployable components. Each of these components has their own package.json file. I created a gulp task that uses gulp-install to install dependencies for all of the modules in one go. However this only worked until we reached the magic limit of 17 package.json files. When this happens gulp-install will stop installing packages but will not produce any error message to indicate that something went wrong.