thom4parisot / Imager.jsx

A React component for responsive images in desktop and mobile browsers. Featuring Imager.js.
https://npmjs.com/imager.jsx
MIT License
32 stars 7 forks source link

Fails to install based on devDependencies #7

Closed newtriks closed 9 years ago

newtriks commented 9 years ago

On npm i --save imager.jsx I get the following error:

Error: Cannot find module 'lodash.debounce' from './node_modules/imager.jsx'

The postinstall process is run and the devDependencies are not actually installed. I can confirm that installing all the imager.jsx devDependencies locally and then installing imager.jsx works.

thom4parisot commented 9 years ago

Hm weird: it is a devDependency but the build should be ran only if the install is different from NODE_ENV=production.

Any reason not to have the devDependencies to be pulled down?

newtriks commented 9 years ago

Sorry, I maybe confusing the actual sequence of events causing the problem. The error is thrown when simply trying to install image.jsx as per the instructions in the readme i.e. npm i --save imager.jsx.

I was stating that if I manually installed the dev dependencies in the imager.jsx package.json e.g. npm install lodash.debounce etc then run npm i --save imager.jsx it successfully installs.

thom4parisot commented 9 years ago

Okay you are not confused: it seems the postinstall script is ran before the devDependencies are completely installed. I published a new version which makes the build manual, if needed. It should be better :-)

newtriks commented 9 years ago

Good job @oncletom nice one.

thom4parisot commented 9 years ago

Well thanks for reporting it. Let me know if you have other feedbacks :-)