Mike-Dax / gatsby-remark-videos

Embed html5 style looping videos in your Gatsby site direct from your markdown. Used on https://electricui.com
MIT License
13 stars 13 forks source link

Does not build with the latest version of Gatsby #6

Closed jhodges10 closed 3 years ago

jhodges10 commented 5 years ago

It would appear the problem is related to having index.js nested inside of the lib folder rather than in the package root.

By editing it locally, I was able to get past that error.

jhodges10 commented 5 years ago

Check my branch for fixes - https://github.com/jhodges10/gatsby-remark-videos

Mike-Dax commented 5 years ago

Thank you for this - I'll look at it this weekend.

Mike-Dax commented 5 years ago

Yeah so I can't replicate this either ahah. Can you try the latest version I just published? I might have accidentally fixed this while cleaning up other stuff.

jhodges10 commented 5 years ago

I tried the latest version, but still wasn't having luck. Looks like installing through NPM doesn't quite work right.

I've ready about downloading/installing to a gastby-plugins directory that obviates the need to have an index.js file in the package root, but I haven't done enough research myself.

What version of Gatsby are you using that this works out of the box with?

Ricky-NSW commented 5 years ago

Hi @jhodges10 I also got an error:

Error: Unable to find plugin "gatsby-remark-videos". Perhaps you need to install its package?

Moving the index.js file into the module's root folder (and updating the reference in the package.json file) removed that error but I am still having trouble getting the video to build.

In the DOM I get:

<p><img src="/video-005f876f9d18f91243091159488a6c99.mp4"></p>

Is there a log or something I can check to see why the video is not building, as I am not getting any errors to point me in the right direction. Any suggestions would be greatly appreciated. Thanks

chalas-ch commented 5 years ago

Hello, I have the same error as you @Rickyhobbs, I tried installing the plugin on a fresh Gatsby install and I got the same Unable to find plugin error. The solution you describe removes the error but the videos still get interpreted as images, the exact same as you. Is it a problem with the version of Gatsby ?

forrestm commented 4 years ago

Hey @Ricky-NSW,

I know it's been a while, but were you ever able to figure out the <img> tag? I am having the same problem. Same as @chalas-ch, the videos are interpreted as images. Thanks.

Ricky-NSW commented 4 years ago

Sorry @forrestm I think I gave up and looked for another solution. You're right it was a while ago, I'll try and remember and get back to you. soz

Ricky-NSW commented 3 years ago

I have spent about 10 hours trying to get this to work again with no luck. Trying to implement in Gatsby 3.5.0 and still no luck there either.

Mike-Dax commented 3 years ago

The 0.4.x releases are Gatsby v3 compatible.

gatsby-remark-images was also incorrectly trying to convert videos, that's been fixed upstream at https://github.com/gatsbyjs/gatsby/pull/32868