Comments (12)
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.
Same problem can easily replicate just by installing and dropping in default configuration
from gatsby-plugin-amp.
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.
@jafaircl i tried this and unfortunately it did not resolve the issue
from gatsby-plugin-amp.
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.
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.
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.
@jafaircl I can confirm that installing canvas-prebuilt
doesn't resolve the issue. Anything I can do to help?
from gatsby-plugin-amp.
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.
@jpreecedev pull requests are always welcome
from gatsby-plugin-amp.
This appears to have been resolved
from gatsby-plugin-amp.
Great. I'll close it for now and if this pops up again I'll reopen it.
from gatsby-plugin-amp.
Related Issues (20)
- Amp tag not being set on index.html HOT 15
- The new created amp version of the file doesnot create the transformed markdown img tag to amp-img HOT 1
- Don't Remove JSON+LD HOT 3
- (feat) allow analytics option to be an array of providers
- Replace existing canonical tag if it exists HOT 1
- GraphQL query prevents compile HOT 5
- gatsby-plugin-amp include animate.css HOT 3
- Issue with 'disable-session-states' with amp-accordion HOT 1
- Custom javascript is not allowed | error in custom-element HOT 5
- duplicated /amp/amp in the generated amp html HOT 3
- Some paragraphs don't have ending periods.
- How do you style without being able to see changes in develop mode?
- Preloaded JS is downloaded, but never used
- Exclude Path
- Pathidentifier not working HOT 1
- Typography.js styles do not get included in amp-custom tag HOT 1
- Fix jsdom workaround
- Plugin not working HOT 4
- Netlify Deploying Error: Cannot read property '__html' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-plugin-amp.