When I run $ gatsby build
it throws the below error.
gatsby build
I cannot publish my current project publicly and am unable to reproduce with a simple starter project.
Gatsby should build the project (same as in v2.10.5
).
After updating from v2.10.5
to v2.13.41
I get the following error after running $ gatsby build
:
> gatsby build
success open and validate gatsby-configs - 0.131 s
ERROR
Error in "/Users/zoec/Desktop/pro-com-homepage/node_modules/gatsby-plugin-manifest/gatsby-node.js": Cannot find module 'gatsby/dist/utils/create-content-digest'
Error: Cannot find module 'gatsby/dist/utils/create-content-digest'
- loader.js:581 Function.Module._resolveFilename
internal/modules/cjs/loader.js:581:15
- loader.js:507 Function.Module._load
internal/modules/cjs/loader.js:507:25
- loader.js:637 Module.require
internal/modules/cjs/loader.js:637:17
- v8-compile-cache.js:159 require
[pro-com-homepage]/[v8-compile-cache]/v8-compile-cache.js:159:20
- gatsby-node.js:19 Object.<anonymous>
[pro-com-homepage]/[gatsby-plugin-manifest]/gatsby-node.js:19:51
- v8-compile-cache.js:178 Module._compile
[pro-com-homepage]/[v8-compile-cache]/v8-compile-cache.js:178:30
- loader.js:700 Object.Module._extensions..js
internal/modules/cjs/loader.js:700:10
- loader.js:599 Module.load
internal/modules/cjs/loader.js:599:32
- loader.js:538 tryModuleLoad
internal/modules/cjs/loader.js:538:12
- loader.js:530 Function.Module._load
internal/modules/cjs/loader.js:530:3
- loader.js:637 Module.require
internal/modules/cjs/loader.js:637:17
- v8-compile-cache.js:159 require
[pro-com-homepage]/[v8-compile-cache]/v8-compile-cache.js:159:20
- resolve-module-exports.js:126 module.exports
[pro-com-homepage]/[gatsby]/dist/bootstrap/resolve-module-exports.js:126:26
- validate.js:124 flattenedPlugins.forEach.plugin
[pro-com-homepage]/[gatsby]/dist/bootstrap/load-plugins/validate.js:124:31
- Array.forEach
- validate.js:117 collatePluginAPIs
[pro-com-homepage]/[gatsby]/dist/bootstrap/load-plugins/validate.js:117:20
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.11.0/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 75.0.3770.100
Safari: 12.1.1
npmPackages:
gatsby: ^2.13.41 => 2.13.41
gatsby-image: 2.2.3 => 2.2.3
gatsby-plugin-env-variables: 1.0.1 => 1.0.1
gatsby-plugin-google-analytics: 2.1.0 => 2.1.0
gatsby-plugin-manifest: 2.2.0 => 2.2.0
gatsby-plugin-material-ui: 2.0.1 => 2.0.1
gatsby-plugin-offline: 2.2.0 => 2.2.0
gatsby-plugin-react-helmet: 3.1.0 => 3.1.0
gatsby-plugin-segment-js: 3.0.1 => 3.0.1
gatsby-plugin-sharp: 2.2.1 => 2.2.1
gatsby-plugin-sitemap: 2.2.0 => 2.2.0
gatsby-source-prismic: 2.2.0 => 2.2.0
gatsby-transformer-sharp: 2.2.0 => 2.2.0
npmGlobalPackages:
gatsby-cli: 2.7.20
I am having the exact same error. I have a Gatsby-Contentful-Netlify setup. Builds in Netlify began to fail yesterday with contentful updates even though I haven't made any changes for several days.
I attempted to update both gatsby
and gatsby-cli
.
EDIT: Should say the above did not work for me.
To get rid of this error, I removed the optional gatsby-plugin-manifest
that comes with the starter in the gatsby-config.js
.
Possibly was related to https://github.com/gatsbyjs/gatsby/compare/gatsby%402.13.32...gatsby%402.13.33
When I rolled back to 2.13.32 it worked, 2.13.33 didn't work.
the same issue occur with me
Can you try updating gatsby-plugin-manifest
?
Yep, updating gatsby-plugin-manifest
fixed the issue. Want me to close this?
@zoecarver thanks for offering! Let's go ahead and close.
For anyone else:
npm i gatsby-plugin-manifest
should do the trick. Thanks!
I tried the previous fixes but none worked.
I still get the following error on build:
Error: Cannot find module 'gatsby/dist/utils/create-content-digest'
v8-compile-cache.js:159 require
[gatsby-starter-cv]/[gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20gatsby-node.js:19 Object.
[gatsby-starter-cv]/[gatsby-plugin-manifest]/gatsby-node.js:19:51v8-compile-cache.js:178 Module._compile
[gatsby-starter-cv]/[gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30v8-compile-cache.js:159 require
[gatsby-starter-cv]/[gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20resolve-module-exports.js:126 module.exports
[gatsby-starter-cv]/[gatsby]/dist/bootstrap/resolve-module-exports.js:126:26validate.js:124 flattenedPlugins.forEach.plugin
[gatsby-starter-cv]/[gatsby]/dist/bootstrap/load-plugins/validate.js:124:31Array.forEach
validate.js:117 collatePluginAPIs
[gatsby-starter-cv]/[gatsby]/dist/bootstrap/load-plugins/validate.js:117:20
Same here. Tried to update the gatsby-plugin-manifest, but that did not help. Still get the error. Using gatsby 2.18.16 and latest version of the gatsby-plugin-manifest, 2.2.34. My complete error is:
Error: Cannot find module 'gatsby/dist/utils/create-content-digest'
Require stack:
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby-plugin-manifest/gatsby-node.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby/dist/bootstrap/resolve-module-exports.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby/dist/bootstrap/load-plugins/load.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby/dist/bootstrap/load-plugins/index.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby/dist/bootstrap/index.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby/dist/commands/build.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby-cli/lib/create-cli.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby-cli/lib/index.js
- /Users/mariacam/Development/interglobalmedia/node_modules/gatsby/dist/bin/gatsby.js
@interglobalmedia I just tried with [email protected] and [email protected] fixed it for me
Most helpful comment
@zoecarver thanks for offering! Let's go ahead and close.
For anyone else:
should do the trick. Thanks!