[ gatsby ] Error: Cannot find module ‘gatsby/graphql’

Problem

$ gatsby build
success delete html and css files from previous builds — 0.036 s
success open and validate gatsby-config — 0.009 s
success copy gatsby files — 0.025 s
error UNHANDLED EXCEPTION
Error: Cannot find module 'gatsby/graphql'

- v8-compile-cache.js:159 require
[contentful-gatsby-blog]/[v8-compile-cache]/v8-compile-cach e.js:159:20

- extend-file-node.js:3 Object.
[contentful-gatsby-blog]/[gatsby-source-filesystem]/extend- file-node.js:3:18

- v8-compile-cache.js:178 Module._compile
[contentful-gatsby-blog]/[v8-compile-cache]/v8-compile-cach e.js:178:30

- v8-compile-cache.js:159 require
[contentful-gatsby-blog]/[v8-compile-cache]/v8-compile-cach e.js:159:20

- gatsby-node.js:172 Object.
[contentful-gatsby-blog]/[gatsby-source-filesystem]/gatsby- node.js:172:38

- v8-compile-cache.js:178 Module._compile
[contentful-gatsby-blog]/[v8-compile-cache]/v8-compile-cach e.js:178:30

- module.js:11 require
internal/module.js:11:18

- api-runner-node.js:87 runAPI
[contentful-gatsby-blog]/[gatsby]/dist/utils/api-runner-nod e.js:87:20

- api-runner-node.js:187
[contentful-gatsby-blog]/[gatsby]/dist/utils/api-runner-nod e.js:187:33

Solution

install v1 instead of v2

npm install --save gatsby-source-filesystem@1.5.39
npm install gatsby-transformer-json@1.0.20

ref : https://github.com/gatsbyjs/gatsby/issues/6560

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s