Closed stormslowly closed 8 years ago
It's happening to me too
@stormslowly even when I add some debouncing, sometimes it fails... do you have any advices on how to solve this ?
@rafaelcorreiapoli ref the PR https://github.com/dantrain/react-stonecutter/pull/13
@stormslowly I tried to install from your fork and I have this: npm i --save git+https://github.com/51ulong/react-stonecutter.git
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--save" "git+https://github.com/51ulong/react-stonecutter.git"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! react-stonecutter@0.3.1 postinstall: `gulp build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the react-stonecutter@0.3.1 postinstall script 'gulp build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-stonecutter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-stonecutter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-stonecutter
npm ERR! There is likely additional logging output above.
@rafaelcorreiapoli install from npm the devdependencies
will not be installed, so the build will failed. i don't have good solution now.
in my project, i just clone the repo in another directory , after npm install all its dependencies ( dependencies devdep and peerdep) then gulp build the lib.
or you can build the lib file then publish another npm package , then install the package.
@dantrain Please merge this :)
I've merged this and added a few retries just in case, hope it helps!
the reason is that when
imagesloaded
callback is called, the DOM still don't have height (0). so when layout try to layout the item it throws the error.my current solution is using lodash
debounce
to slow down the speed of add items.i will fix it by check the height element when imagesloaded