✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Error when adding blog posts to Gatsby portfolio site

1 replies
Last updated: Oct 8, 2021
Hi, I just started getting this error recently when I was trying to add blog-posts to my gatsby portfolio site.

ERROR #98123  WEBPACK
sanity-gatsby-portfolio-web: Generating development JavaScript bundle failed
sanity-gatsby-portfolio-web: Module parse failed: Unexpected token (11:13)
sanity-gatsby-portfolio-web: File was processed with these loaders:
sanity-gatsby-portfolio-web:  * ./node_modules/css-loader/dist/cjs.js
sanity-gatsby-portfolio-web:  * ./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js
sanity-gatsby-portfolio-web: You may need an additional loader to handle the result of these loaders.
sanity-gatsby-portfolio-web: | export const absolute = "figure-module--absolute--27FGw";
sanity-gatsby-portfolio-web: | export const block = "figure-module--block--39IYL";
sanity-gatsby-portfolio-web: > export const !block = "figure-module--!block--1Z8W6";
sanity-gatsby-portfolio-web: | export const grid = "figure-module--grid--3Ky__";
sanity-gatsby-portfolio-web: | export const hidden = "figure-module--hidden--3-7V1";
ERROR in ./src/components/figure.module.css
sanity-gatsby-portfolio-web: Module build failed (from
sanity-gatsby-portfolio-web: ./node_modules/mini-css-extract-plugin/dist/loader.js):
sanity-gatsby-portfolio-web: ModuleParseError: Module parse failed: Unexpected token (11:13)
sanity-gatsby-portfolio-web: File was processed with these loaders:
sanity-gatsby-portfolio-web:  * ./node_modules/css-loader/dist/cjs.js
sanity-gatsby-portfolio-web:  * ./node_modules/gatsby-plugin-postcss/node_modules/postcss-loader/dist/cjs.js
sanity-gatsby-portfolio-web: You may need an additional loader to handle the result of these loaders.
sanity-gatsby-portfolio-web: | export const absolute = "figure-module--absolute--27FGw";
sanity-gatsby-portfolio-web: | export const block = "figure-module--block--39IYL";
sanity-gatsby-portfolio-web: > export const !block = "figure-module--!block--1Z8W6";
sanity-gatsby-portfolio-web: | export const grid = "figure-module--grid--3Ky__";
sanity-gatsby-portfolio-web: | export const hidden = "figure-module--hidden--3-7V1";
sanity-gatsby-portfolio-web:     at handleParseError
sanity-gatsby-portfolio-web: (/Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gatsby-por
sanity-gatsby-portfolio-web: tfolio/web/node_modules/webpack/lib/NormalModule.js:920:19)
sanity-gatsby-portfolio-web:     at /Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gats
sanity-gatsby-portfolio-web: by-portfolio/web/node_modules/webpack/lib/NormalModule.js:1022:5
sanity-gatsby-portfolio-web:     at processResult (/Users/christianbergstrom/Documents/GitHub/christianbergst
sanity-gatsby-portfolio-web: rom-sanity-gatsby-portfolio/web/node_modules/webpack/lib/NormalModule.js:742:11)
sanity-gatsby-portfolio-web:     at /Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gats
sanity-gatsby-portfolio-web: by-portfolio/web/node_modules/webpack/lib/NormalModule.js:806:5
sanity-gatsby-portfolio-web:     at /Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gats
sanity-gatsby-portfolio-web: by-portfolio/web/node_modules/loader-runner/lib/LoaderRunner.js:406:3
sanity-gatsby-portfolio-web:     at iterateNormalLoaders
sanity-gatsby-portfolio-web: (/Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gatsby-por
sanity-gatsby-portfolio-web: tfolio/web/node_modules/loader-runner/lib/LoaderRunner.js:232:10)
sanity-gatsby-portfolio-web:     at iterateNormalLoaders
sanity-gatsby-portfolio-web: (/Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gatsby-por
sanity-gatsby-portfolio-web: tfolio/web/node_modules/loader-runner/lib/LoaderRunner.js:239:10)
sanity-gatsby-portfolio-web:     at /Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gats
sanity-gatsby-portfolio-web: by-portfolio/web/node_modules/loader-runner/lib/LoaderRunner.js:254:3
sanity-gatsby-portfolio-web:     at context.callback
sanity-gatsby-portfolio-web: (/Users/christianbergstrom/Documents/GitHub/christianbergstrom-sanity-gatsby-por
sanity-gatsby-portfolio-web: tfolio/web/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
sanity-gatsby-portfolio-web:     at Object.loader (/Users/christianbergstrom/Documents/GitHub/christianbergst
sanity-gatsby-portfolio-web: rom-sanity-gatsby-portfolio/web/node_modules/css-loader/dist/index.js:182:3)
sanity-gatsby-portfolio-web:  @ ./src/components/figure.js 9:0-46 21:15-26
sanity-gatsby-portfolio-web:  @ ./src/components/serializers.js 7:0-34 31:12-18
sanity-gatsby-portfolio-web:  @ ./src/components/block-content.js 10:0-40 16:17-28
sanity-gatsby-portfolio-web:  @ ./src/components/project.js 10:0-43 307:51-63
sanity-gatsby-portfolio-web:  @ ./src/templates/project.js 10:0-44 59:51-58
sanity-gatsby-portfolio-web:  @ ./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js 56:11-58:5
sanity-gatsby-portfolio-web:  @ ./.cache/app.js 16:0-52 29:87-33:1 32:29-42 35:27-40 29:0-33:2
sanity-gatsby-portfolio-web: 1 ERROR in child compilations (Use 'stats.children: true' resp.
sanity-gatsby-portfolio-web: '--stats-children' for more details)
success Writing page-data.json files to public directory - 0.047s - 0/13
I'm guessing this is related to something in the
figure
component but I'm not sure how any of my blocks render out with a
!block
and I'm sort of lost on how to proceed rn. I haven't made other significant changes to the css, so I'm not sure why its erroring out from a cssloader perspective
Oct 8, 2021, 4:46 PM
I removed an import on figure and it started working again
Oct 8, 2021, 6:28 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?