Semi-dependency on `indexof` throws tons of warnings in Meteor
I don't know about other people's experience but I've got these annoying warnings...
Unable to resolve some modules:
"indexof" in /usr/share/meteor-app/node_modules/component-classes/index.js (web.browser)
If you notice problems related to these missing modules, consider running:
meteor npm install --save indexof
every time the Meteor tool rebuilds.
And the thing is, I don't even use this package. Instead the one package I use (rc-slider) depends on another which depends on another which depends on another... which then depends on this one.
Maybe the solution is as simple as just add indexof to my dependency list but that creates confusion later when I remove rc-slider at some point and don't remember removing indexof together.
#30 seems to be addressing this issue. I'm glad I'm not alone out there.
Same here, except using Rollup instead of Meteor. For some reason, the code here is trying to load either indexof or component-indexof, despite only declaring a dependency on component-indexof in package.json. There's really no point in that.
$ npm ls component-indexof
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]
Anyone hitting this problem can use my fork, which fixes the problem by not doing the unnecessary conditional require().
"dependencies": {
"component-classes": "[email protected]:sholladay/classes.git#adfdb84d9977403b4924801b68b354e5356ca0a6"
}
That will work even if you are using this module indirectly, as I am, such as when your direct dependency is rc-slider.