Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gatsby - Production build throwing error as yoga-layout-prebuilt #131

@10-seconds

Description

@10-seconds

In our local, production build is working fine, if we deployed into netlify and prod build throwing below error.

11:55:22 AM: ❯ Config file
11:55:22 AM:   No config file was defined: using default values.
11:55:22 AM: ​
11:55:22 AM: ❯ Context
11:55:22 AM:   production
11:55:22 AM: ​
11:55:22 AM: ┌────────────────────────────────┐
11:55:22 AM: │ 1. Build command from settings │
11:55:22 AM: └────────────────────────────────┘
11:55:22 AM: ​
11:55:22 AM: $ gatsby build
11:55:23 AM: /opt/build/repo/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
11:55:23 AM:         throw ex;
11:55:23 AM:         ^
11:55:23 AM: Error: Cannot find module 'acorn'
11:55:23 AM: Require stack:
11:55:23 AM: - /opt/build/repo/node_modules/acorn-jsx/index.js
11:55:23 AM: - /opt/build/repo/node_modules/buble-jsx-only/dist/buble.cjs.js
11:55:23 AM: - /opt/build/repo/node_modules/@mdx-js/runtime/dist/cjs.js
11:55:23 AM: - /opt/build/repo/node_modules/gatsby-recipes/dist/cli.js
11:55:23 AM: - /opt/build/repo/node_modules/gatsby-recipes/dist/index.js
11:55:23 AM: - /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli/lib/recipes.js
11:55:23 AM: - /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli/lib/create-cli.js
11:55:23 AM: - /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli/lib/index.js
11:55:23 AM: - /opt/build/repo/node_modules/gatsby/dist/bin/gatsby.js
11:55:23 AM: - /opt/build/repo/node_modules/gatsby/cli.js

Anyone help this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions