Open AndyAyrey opened 3 years ago
Hi there!
I'm attempting to generate a site based off some Markdown files with footnotes, but no figures. Example Markdown File: model-legislation-chapter-1.md
gatsby build fails with the following logs.
gatsby build
Missing parser, cannot attach `remark-figure` ERROR There was an error in your GraphQL query: 1 | query usrsrcappwwwsrcpagesMarkdownRemarkFrontmatterSlugJs1238545120($id: String!) { 2 | markdownRemark(id: {eq: $id}) { > 3 | html 4 | frontmatter {: | ^ 5 | date(formatString: "MMMM DD, YYYY") 8 | } 6 | slug 10 | } 7 | title 11 | 9 | } Plugin: none Url path: /definitions/ File path: /usr/src/app/www/src/pages/{MarkdownRemark.frontmatter__slug}.js
From what I can tell, the query is fine, and build proceeds correctly if I comment out the following lines in index.js of gatsby-remark-tufte:
index.js
gatsby-remark-tufte
"use strict"; const sidenotes = require("./src/remark-sidenotes-transformer")(); const wrapInSection = require("./src/wrap-in-section-transformer")(); // const tufteFigureTransformer = require("./src/remark-figure-transformer")(); // const tufteFigureParser = require("./src/remark-figure-parser"); module.exports = ({ markdownAST }, pluginOptions = {}) => { try { sidenotes(markdownAST); } catch (error) { console.error("Error applying sidenotes: ", error); } wrapInSection(markdownAST); // tufteFigureTransformer(markdownAST); return markdownAST; }; // module.exports.setParserPlugins = (options) => { // return [[tufteFigureParser]]; // };
Interim solution for those who don't need figure support, a fork with the remark-parse dependency removed.
yarn add Zygar/gatsby-remark-tufte
Hi there!
I'm attempting to generate a site based off some Markdown files with footnotes, but no figures. Example Markdown File: model-legislation-chapter-1.md
gatsby build
fails with the following logs.From what I can tell, the query is fine, and build proceeds correctly if I comment out the following lines in
index.js
ofgatsby-remark-tufte
: