Code Monkey home page Code Monkey logo

Comments (12)

jafaircl avatar jafaircl commented on July 16, 2024

It looks like the canvas package wasn't installed along with jsdom. My first thought is to try reinstalling your dependencies. Can you link to a repo that reproduces the issue?

from gatsby-plugin-amp.

jpreecedev avatar jpreecedev commented on July 16, 2024

Same problem can easily replicate just by installing and dropping in default configuration

from gatsby-plugin-amp.

jafaircl avatar jafaircl commented on July 16, 2024

It looks like jsdom needs the canvas package. Can either of you try running npm install canvas and try a build again? If that fixes it I’ll add it as a dependency for now until I have time to come up with a better solution.

from gatsby-plugin-amp.

jpreecedev avatar jpreecedev commented on July 16, 2024

@jafaircl i tried this and unfortunately it did not resolve the issue

from gatsby-plugin-amp.

version-1 avatar version-1 commented on July 16, 2024

@jafaircl @jpreecedev

Can you link to a repo that reproduces the issue?

I can't prepare it repository soon but I think the error occur on development env.
gatsby develop

It may be caused the sources are built on web not node.
https://webpack.js.org/concepts/targets/

It seems like jsdom is work on only 'node' .

from gatsby-plugin-amp.

jafaircl avatar jafaircl commented on July 16, 2024

I’ll take a look at it tomorrow and get a better idea of what’s happening and how it can be fixed.

from gatsby-plugin-amp.

jafaircl avatar jafaircl commented on July 16, 2024

Now that I’m looking into it, could you try running npm install canvas-prebuilt? It seems like jsdom is fine with that package and I’m seeing issues in the jsdom repo where that seems to fix similar problems.

from gatsby-plugin-amp.

jpreecedev avatar jpreecedev commented on July 16, 2024

@jafaircl I can confirm that installing canvas-prebuilt doesn't resolve the issue. Anything I can do to help?

from gatsby-plugin-amp.

jafaircl avatar jafaircl commented on July 16, 2024

Ok after taking a look at it and pushing a new version, 0.1.26 should fix this issue. Please let me know if it doesn’t. Thanks for all your help.

from gatsby-plugin-amp.

jafaircl avatar jafaircl commented on July 16, 2024

@jpreecedev pull requests are always welcome

from gatsby-plugin-amp.

jpreecedev avatar jpreecedev commented on July 16, 2024

This appears to have been resolved

from gatsby-plugin-amp.

jafaircl avatar jafaircl commented on July 16, 2024

Great. I'll close it for now and if this pops up again I'll reopen it.

from gatsby-plugin-amp.

Related Issues (20)

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.