GithubHelp home page GithubHelp logo

Comments (5)

jquense avatar jquense commented on July 19, 2024

Not sure, I'm wondering if it's browserify specific issue. What version are you using? Can you confirm that the /lib/util/dom.js is in the package? I am wondering if browserify expects case sensitive module paths...

I am assuming you are using the npm package and requiring it in the normal manner?

from react-widgets.

cbrake avatar cbrake commented on July 19, 2024
[cbrake@mars react-widgets-test]$ browserify --version
5.11.2

mkdir test; cd test
echo "require ('react-widgets')" > main.js
npm install react-widgets
browserify main.js -o bundle.js
Error: Cannot find module '../util/dom' from '/home/cbrake/react-widgets-test/node_modules/react-widgets/lib/dropdowns'
    at /usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:42:25
    at load (/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:60:43)
    at /usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:66:22
    at /usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:21:47
    at Object.oncomplete (fs.js:107:15)

find -name dom.js
<returns nothing>

I'm no expert at this stuff, so I may be doing something wrong, but the above process seems to work with other components such as react, d3, etc.

from react-widgets.

jquense avatar jquense commented on July 19, 2024

hmm a bit embarrassing, but i think the problem is that the module requires '../util/dom while the file is actually DOM.js this works fine on Windows (my machine) since paths are case insensitive, but obviously isn't going to work on *nix machines. I will push an update Sunday for this (on vacation!) but if you try doing cp ./node_modules/react-widgets/lib/util/DOM.js ./node_modules/react-widgets/lib/util/dom.js that might fix it temporarily, (or at least expose a different error :P)

either I will make sure all files are requiring the case sensative on paths, and hopefully that should solve the issue

from react-widgets.

cbrake avatar cbrake commented on July 19, 2024

yup that fixed it -- thanks!

from react-widgets.

jquense avatar jquense commented on July 19, 2024

ok fixed in 1.1.2 and up on NPM

from react-widgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.