[V2] | Build Fails on Server build | (undefined) API is not available in this browser.
See original GitHub issue🐛 Bug Report
Error: Sorry, the Vimeo Player API is not available in this browser.
This works well in the dev mode but the build throws an error.
Have you read the Contributing Guidelines on issues?Yes
I am trying to import and use a React component in the .mdx files in the docs folder.
abc.mdx import Vimeo from ‘@u-wave/react-vimeo’; <Vimeo video="https://vimeo.com/1234567789" responsive={true} width={640} height={480} />
To Reproduce
(Write your steps here:)
- Scaffold a v2 docusaurus project
- Install @u-wave/react-vimeo from npm and import it in docs/doc2.mdx file
- npm start -> starts the build and video is displayed in the component
- Try to build the project npm run build -> errors out
Expected behavior
The build version should be successful and should behave like the dev version.
(Write what you thought would happen.)
Actual Behavior
The prod build error out
(Write what happened. Add screenshots, if applicable.)

Reproducible Demo
https://github.com/ramakrishnan3/ducusaurus-bug-report
-> clone the repo
-> npm i
-> npm start - successful
-> npm run build - errors out
(Paste the link to an example repo, including a siteConfig.js, and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)

Top Related StackOverflow Question
@yangshun I’ve been hacking away at v2 and ran into something similar, and after several days I came across this thread. This fixed the issue I had, and now I can go out for a beer 😃 cheers!
This is pretty late, but for anyone hitting this, I stopped using the
@u-wave/react-vimeopackage, and instead added my own component to my Docusaurus project insrc/components/vimeo.jsx:Then, I can just do this in any markdown docs file:
It doesn’t give you all the hooks that
@u-wave/react-vimeodoes, but it at least embeds a vimeo video into your documentation that resizes reactively, lets you do fullscreen, etc.