1egoman / funnies

:stuck_out_tongue_winking_eye: Make users laugh when your app loads.
https://1egoman.github.io/funnies/
MIT License
178 stars 54 forks source link

Disable react components? #105

Closed nicholaszuccarelli closed 6 years ago

nicholaszuccarelli commented 6 years ago

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

1egoman commented 6 years ago

@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

nicholaszuccarelli commented 6 years ago

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

nicholaszuccarelli commented 6 years ago

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

1egoman commented 6 years ago

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)

nicholaszuccarelli commented 6 years ago

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

1egoman commented 6 years ago

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)

nicholaszuccarelli commented 6 years ago

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)

1egoman commented 6 years ago

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