Code Monkey home page Code Monkey logo

gatsby-mdx-tts-example's Introduction

gatsby-mdx-tts-example's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

robertmain53

gatsby-mdx-tts-example's Issues

Gatsby build fails

Some facts:

  • gatsby develop is working fine, also when adding SpeechOutput components.
  • gatsby build works as long as the SpeechOutput components are removed from /content/posts/curses-and-counter-courses/index.mdx
  • gatsby build fails if SpeechOutput components are used

Error message:
The error message seems to point to an unhandled promise rejection. However, when handling it in the gatsby-mdx-tts plugin code there will be other errors. What stays the same is this:

Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.htmlinvariant=31&args[]=%5Bobject%20Promise%5D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Speculation:
I had problems before because there is some code only intended to be executed at build time (to generate the TTS files). For some reason it gets imported to the runtime / SSR when the SpeechOutput component is used.

To solve that original problem I have added the browser field to the plugin's package.json which has helped from including the TTS-generating code at runtime but it seems to now not be working for SSR...

// Inside plugin's package.json
"main": "index.js",
"browser": "SpeechOutput.js",

Create live demo page

Upload this example page to Netlify and link it in the plugin's README file so interested people can directly try and see the speech output. Issue #1 needs to be resolved first though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.