What is the reason I have this issue

I wanted to use https://github.com/react-component/tooltip but it has this in its code

var classNames = require('classnames')

This brakes Meteor, to work it suppose to be camel cased

var classNames = require('classNames')

I have manually edited the code after npm install to make it work but every npm install breaks the app. I have debugged it to the point that I have found out that its broken only on the client side code and opened an issue:

Now I need to deploy and my app won’t work. Tell me, what to do brothers.

I can’t see that code anywhere in the tooltip package

There are couple of files after you install it via npm. Theres none in the source but when you install it, for example: rc-tooltip/node-modules/rc-util/lib/classSet.js

Did you npm install the classnames package?

I use it in other parts of my app, so yes I did. Why does it matter?

Just trying to rule out possible causes… it’s weird that camelcase would suddenly make it work when the lowercase version doesn’t… maybe @benjamn knows more

I will run it trough more test and tell you how to reproduce it


I fixed it by changing ‘classNames’ into ‘classnames’ everywhere in my code. It’s weird because I had ‘classNames’ all the time during development and it worked fine. Then suddenly it started causing errors.

1 Like