gatsby: Build gives webpack error 98001. Generated engines use disallowed import "node-gyp-build"

Preliminary Checks

Description

Cloned from github. gatsby new fg https://github.com/gatsbyjs/gatsby-starter-default gatsby develop works fine. gatsby build gives: success load gatsby config - 0.023s success load plugins - 0.641s … success Execute page configs - 0.029s failed Validating Rendering Engines - 0.719s

ERROR #98001 WEBPACK

Built Rendering Engines failed validation failed validation.

Please open an issue with a reproduction at https://github.com/gatsbyjs/gatsby/issues/new for more help

Error: Generated engines use disallowed import “node-gyp-build”. Only allowed imports are to Node.js builtin modules or engines internals.

  • child.ts:60 Function._module.default._load [fg]/[gatsby]/src/utils/validate-engines/child.ts:60:11

  • loader:1005 Module.require …

Reproduction Link

https://github.com/gatsbyjs/gatsby-starter-default

Steps to Reproduce

  1. Clone the repository
  2. gatsby build

Expected Result

Expected the build to complete without error

Actual Result

Build webpack error 98001

Environment

System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Binaries:
    Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.9.6 - /usr/bin/python
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (98.0.1108.56)
  npmPackages:
    gatsby: ^4.8.0 => 4.8.0 
    gatsby-plugin-gatsby-cloud: ^4.8.0 => 4.8.0 
    gatsby-plugin-image: ^2.8.0 => 2.8.0 
    gatsby-plugin-manifest: ^4.8.0 => 4.8.0 
    gatsby-plugin-offline: ^5.8.0 => 5.8.0 
    gatsby-plugin-react-helmet: ^5.8.0 => 5.8.0 
    gatsby-plugin-sharp: ^4.8.0 => 4.8.0 
    gatsby-source-filesystem: ^4.8.0 => 4.8.0 
    gatsby-transformer-sharp: ^4.8.0 => 4.8.0 
  npmGlobalPackages:
    gatsby-cli: 4.8.0

Config Flags

It is unchanged from the repo

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (6 by maintainers)

Most upvoted comments

Again, we need a minimal reproduction with clear instructions on what version and system to use. Otherwise we can’t help. I’ve minimized comments that showed some package.json as it’s not relevant to this issue. Also, it doesn’t help to make false claims about how we write or test code, our CI runs on Windows and we have people using it successfully on Windows. We want to help but y’all need to give us more information. Thanks!

@tyhopp I am facing the same issue this only stared to happen from this morning ,

gatsby version “^4.0.0”,

Windows System

image