question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cli: yoga-layout-prebuilt error on gatsby build

See original GitHub issue

Description

After an update did using the command npm update and the Gatsby updated from 2.21.17 to 2.22.12 no command did using gatsby-cli works anymore.

Steps to reproduce

  1. Start a new gatsby project or just run npm update; and,
  2. Try to execute gatsby develop or build or serve.

Expected result

Expected to run the development server.

Actual result

/home/alexandre/projects/bestcanais/frontend/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: write EACCES
    at process.target._send (internal/child_process.js:806:20)
    at process.target.send (internal/child_process.js:677:19)
    at /home/alexandre/projects/bestcanais/frontend/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/loggers/ipc/index.js:58:13
    at dispatch (/home/alexandre/projects/bestcanais/frontend/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/redux/index.js:54:5)
    at /home/alexandre/projects/bestcanais/frontend/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/redux/internal-actions.js:42:7
    at dispatch (/home/alexandre/projects/bestcanais/frontend/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/redux/index.js:33:5)
    at /home/alexandre/projects/bestcanais/frontend/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/redux/index.js:30:28
    at Array.forEach (<anonymous>)
    at dispatch (/home/alexandre/projects/bestcanais/frontend/node_modules/gatsby/node_modules/gatsby-cli/lib/reporter/redux/index.js:30:12)
    at Reporter.pendingActivity (/home/alexandre/projects/bestcanais/frontend/node_modules/redux/lib/redux.js:483:12)
    at module.exports (/home/alexandre/projects/bestcanais/frontend/node_modules/gatsby/dist/commands/develop-process.js:413:21)
    at Object.<anonymous> (/home/alexandre/projects/bestcanais/frontend/.cache/tmp-27267-PDO5cWsb1RYS:4:5)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
Emitted 'error' event on process instance at:
    at processEmit [as emit] (/home/alexandre/projects/bestcanais/frontend/node_modules/signal-exit/index.js:161:32)
    at internal/child_process.js:810:39
    at processTicksAndRejections (internal/process/task_queues.js:79:11) {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'write'
}

Environment

  System:
    OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz
    Shell: 4.4.20 - /bin/bash
  Languages:
    Python: 2.7.17 - /home/alexandre/.pyenv/shims/python
  Browsers:
    Chrome: 83.0.4103.61
    Firefox: 76.0.1
  npmPackages:
    gatsby: ^2.21.17 => 2.22.12 
    gatsby-image: ^2.4.5 => 2.4.5 
    gatsby-plugin-google-analytics: ^2.3.2 => 2.3.2 
    gatsby-plugin-manifest: ^2.4.9 => 2.4.9 
    gatsby-plugin-material-ui: ^2.1.9 => 2.1.9 
    gatsby-plugin-offline: ^3.2.7 => 3.2.7 
    gatsby-plugin-react-helmet: ^3.3.2 => 3.3.2 
    gatsby-plugin-sharp: ^2.6.9 => 2.6.9 
    gatsby-source-filesystem: ^2.3.8 => 2.3.8 
    gatsby-source-graphql: ^2.5.2 => 2.5.2 
    gatsby-transformer-sharp: ^2.5.3 => 2.5.3 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:18
  • Comments:83 (32 by maintainers)

github_iconTop GitHub Comments

33reactions
levinocommented, Sep 22, 2020

This is still an issue.

18reactions
erezrokahcommented, Feb 23, 2021

A possible workaround if you’re using yarn is to add the following to package.json:

"resolutions": {
    "mini-css-extract-plugin": "0.11.2"
  },

The underlying cause seems to be that both Gatsby and the CMS plugin have mini-css-extract-plugin as a dependency but with mismatching versions.

Looks like a PR to solve it was already merged, but not released yet. I’ll verify everything works with the latest changes from Gatsby’s master branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CMS: Build breaks due to yoga-layout-prebuilt error - Gatsby ...
Suddenly my builds are broken due to this issue: node_modules/gatsby-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53 ...
Read more >
Getting error on gatsby build command: TypeError ...
I am getting this error when I run the command $ gatsby build on the ... /Users/marcelo/Work/SM/gatsby-on-demand/node_modules/gatsby-cli/lib ...
Read more >
Commands (Gatsby CLI)
The Gatsby command line interface (CLI) is the main tool you use to initialize, build and develop Gatsby sites. How to use gatsby-cli....
Read more >
gatsby-cli | Yarn - Package Manager
Gatsby command-line interface for creating new sites and running Gatsby ... (CLI) is the main tool you use to initialize, build and develop...
Read more >
gatsby-cli - npm Package Health Analysis - Snyk
Gatsby command-line interface for creating new sites and running Gatsby commands For more information about how to use this package see README ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found