davidguttman / cssify

Simple middleware for Browserify to add css styles to the browser.
122 stars 19 forks source link

Error: Cannot find module 'node_modules/cssify' from ... #34

Closed gmaclennan closed 8 years ago

gmaclennan commented 8 years ago

I get this error with v1.0.0 With v0.8.0 it works as expected.

browserify index.js -t cssify > bundle.js
Error: Cannot find module 'node_modules/cssify' from ...

I am using npm 3.5.0 and node v4.2.1. Also tested with npm v2.14.7. Browserify v12.0.1

faergeek commented 8 years ago

Can you please provide the full paths or paths relative to your current working directory? I can't understand the problem without that.

gmaclennan commented 8 years ago

hi @faergeek the module I am having trouble with is https://github.com/digidem/leaflet-side-by-side If I use cssify@0.8.0 npm run build works, if I use cssify@1.0.0 I get the following error:

> leaflet-side-by-side@2.0.0 build /Users/gregor/Dev/DdDev/leaflet-side-by-side
> browserify index.js > leaflet-side-by-side.js

Error: Cannot find module 'node_modules/cssify' from '/Users/gregor/Dev/DdDev/leaflet-side-by-side'
    at /Users/gregor/Dev/DdDev/leaflet-side-by-side/node_modules/resolve/lib/async.js:46:17
    at process (/Users/gregor/Dev/DdDev/leaflet-side-by-side/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/gregor/Dev/DdDev/leaflet-side-by-side/node_modules/resolve/lib/async.js:188:17)
    at load (/Users/gregor/Dev/DdDev/leaflet-side-by-side/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/gregor/Dev/DdDev/leaflet-side-by-side/node_modules/resolve/lib/async.js:92:31)
    at /Users/gregor/Dev/DdDev/leaflet-side-by-side/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)
faergeek commented 8 years ago

Could you provide some minimal project for me to reproduce this error?

faergeek commented 8 years ago

Oh, sorry, here's the code, right? https://github.com/digidem/leaflet-side-by-side

gmaclennan commented 8 years ago

Yes, that's right. If you clone that and npm i cssify@1.0.0 then npm run build you should see the error.

Gregor MacLennan | Digital Democracy http://digital-democracy.org/ | US: 415.234.3373 | Peru: (01) 708 8702 | gmaclennan@digital-democracy.org | [image: Facebook] http://facebook.com/digidemocracy [image: Twitter] http://twitter.com/digidem [image: YouTube] http://youtube.com/digitaldemocracycam

On Tue, Dec 8, 2015 at 1:29 PM, Sergey Slipchenko notifications@github.com wrote:

Oh, sorry, here's the code, right? https://github.com/digidem/leaflet-side-by-side

— Reply to this email directly or view it on GitHub https://github.com/davidguttman/cssify/issues/34#issuecomment-163023273.

faergeek commented 8 years ago

Submitted PR