1egoman/funnies

Disable react components?

nicholaszuccarelli opened this issue ยท 8 comments

I am using VueJS and it is complaining that it cannot resolve "React".

Is there any way to make it pick a random message string without trying to use react?

Thanks

@nicholaszuccarelli I just pushed a new version making the react component optional (v2.0.0)

Try this and let me know how it goes: https://github.com/1egoman/funnies#javascript

Awesome I'll give it a try later! Thanks :)

Hey man, one more problem when installing. It won't actually install now because it is still looking for the react dependency when running npm install --save funnies

React is still a peer dependency (read more), but I don't really see a way around that without separating the react code into a separate package.

Can I take a look at some logs? I suspect you're just getting a warning about the peer dependency being missing (and while it's still something to address, a missing peer dependency shouldn't block installation of a package)

For some reason it is blocking the installation. When I import funnies into the component file, it just complains that funnies doesn't exist.

image

Inside of your node_modules folder, do you have a funnies folder? In the above, it looks like the installation succeeded, but your build script failed. (Trying to figure out if it's something weird with funnies or something weird with the build script)

Yeah, it looks like it did indeed add the files but for some reason the build corrupt.
I deleted the folder and reinstalled and it works now! Thanks a lot (great package btw :P)

Cool, good to hear! If you end up writing a nice Vue wrapper for funnies consider contributing it back to the project! ๐Ÿ˜„