Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby build fails with non-descript ENGINE.VALIDATION Error #38467

Open
2 tasks done
danyim opened this issue Aug 22, 2023 · 19 comments
Open
2 tasks done

Gatsby build fails with non-descript ENGINE.VALIDATION Error #38467

danyim opened this issue Aug 22, 2023 · 19 comments
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@danyim
Copy link

danyim commented Aug 22, 2023

Preliminary Checks

Description

Hello,

I am in the process of bringing my Gatsby v3 site up to v5, and unfortunately I am running into some issues when executing gatsby build. After a gatsby clean and gatsby build --verbose, I receive the following nondescript error:

failed Validating Rendering Engines - 3.372s

 ERROR #98001  ENGINE.VALIDATION

Built Rendering Engines failed validation.

Please open an issue with a reproduction at https://gatsby.dev/new-issue for more help.

  Error: Worker exited before finishing task
  - index.js:205 ChildProcess.<anonymous>
    [daniely.im-gatsby]/[gatsby-worker]/dist/index.js:205:41

not finished Running gatsby.IMAGE_CDN jobs - 75.170s

My repo works without issue when running gatsby develop.

Reproduction Link

(In progress)

Steps to Reproduce

  1. gatsby build --verbose
  2. See error

Expected Result

I expected a successful build

Actual Result

Build fails with ERROR #98001 ENGINE.VALIDATION

Environment

System:
    OS: macOS 12.6.3
    CPU: (8) x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 116.0.5845.96
    Firefox: 115.0.2
    Safari: 15.6.1
  npmPackages:
    gatsby: ^5.11.0 => 5.11.0 
    gatsby-core-utils: ^4.11.0 => 4.11.0 
    gatsby-image: ^3.1.0 => 3.1.0 
    gatsby-plugin-fontawesome-css: ^1.2.0 => 1.2.0 
    gatsby-plugin-gtag: ^1.0.13 => 1.0.13 
    gatsby-plugin-offline: ^6.11.0 => 6.11.0 
    gatsby-plugin-postcss: ^6.11.0 => 6.11.0 
    gatsby-plugin-react-helmet: ^6.11.0 => 6.11.0 
    gatsby-plugin-react-svg: ^3.3.0 => 3.3.0 
    gatsby-plugin-sharp: ^5.11.0 => 5.11.0 
    gatsby-plugin-sitemap: ^6.11.0 => 6.11.0 
    gatsby-plugin-styled-components: ^6.11.0 => 6.11.0 
    gatsby-plugin-typescript: ^5.11.0 => 5.11.0 
    gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4 
    gatsby-source-filesystem: ^5.11.0 => 5.11.0 
    gatsby-source-wordpress: ^7.11.0 => 7.11.0 
    gatsby-transformer-sharp: ^5.11.0 => 5.11.0 
  npmGlobalPackages:
    gatsby-core-utils: 4.8.0
    gatsby: 5.8.0

Config Flags

None

@danyim danyim added the type: bug An issue or pull request relating to a bug in Gatsby label Aug 22, 2023
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 22, 2023
@danyim
Copy link
Author

danyim commented Aug 22, 2023

This issue appears to be similar to #38465, which does not have a resolution

@gustavo-a
Copy link
Contributor

Same error. It seems like an issue with gatsby-source-wordpress since it disappeared after I downgraded it to version 6.25.4

@danyim
Copy link
Author

danyim commented Aug 23, 2023

@gustavo-a Thanks for the tip! That worked!

To anyone else who needs to be unblocked, I was able to get my site building with the following deps:

  System:
    OS: macOS 12.6.3
    CPU: (8) x64 Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 116.0.5845.96
    Firefox: 116.0.2
    Safari: 15.6.1
  npmPackages:
    gatsby: ^5.11.0 => 5.11.0 
    gatsby-core-utils: ^4.11.0 => 4.11.0 
    gatsby-image: ^3.1.0 => 3.11.0 
    gatsby-plugin-fontawesome-css: ^1.2.0 => 1.2.0 
    gatsby-plugin-gtag: ^1.0.13 => 1.0.13 
    gatsby-plugin-image: ^3.11.0 => 3.11.0 
    gatsby-plugin-offline: ^6.11.0 => 6.11.0 
    gatsby-plugin-postcss: ^6.11.0 => 6.11.0 
    gatsby-plugin-react-helmet: ^6.11.0 => 6.11.0 
    gatsby-plugin-react-svg: ^3.3.0 => 3.3.0 
    gatsby-plugin-sharp: ^5.11.0 => 5.11.0 
    gatsby-plugin-sitemap: ^6.11.0 => 6.11.0 
    gatsby-plugin-styled-components: ^6.11.0 => 6.11.0 
    gatsby-plugin-typescript: ^5.11.0 => 5.11.0 
    gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4 
    gatsby-source-filesystem: ^5.11.0 => 5.11.0 
    gatsby-source-wordpress: ^6.25.4 => 6.25.5 
    gatsby-transformer-sharp: ^5.11.0 => 5.11.0 
  npmGlobalPackages:
    gatsby-core-utils: 4.8.0
    gatsby: 5.8.0

@insaurabh
Copy link

insaurabh commented Aug 24, 2023

I am also getting this error

image

It was working fine earlier, i started implementing , and development works fine but the build fails.

  1. I deleted the node_module folder
  2. Deleted package-lock.json
  3. Using node 18.15.0

"gatsby-source-wordpress": "^7.6.0"

Still, the problem is the same, reverted the slice work, but no luck.

@insaurabh
Copy link

6.25.4

Tried with "gatsby-source-wordpress": "7.11.0", still same issue.

@insaurabh
Copy link

I am also getting this error

image

It was working fine earlier, i started implementing , and development works fine but the build fails.

  1. I deleted the node_module folder
  2. Deleted package-lock.json
  3. Using node 18.15.0

"gatsby-source-wordpress": "^7.6.0"

Still, the problem is the same, reverted the slice work, but no luck.

image

After deleting the package-lock.json and reinstalling the modules, now i am getting this error as well, DB source is same, nod modification done in CMS.

@insaurabh
Copy link

I am also getting this error

image

It was working fine earlier, i started implementing , and development works fine but the build fails.

  1. I deleted the node_module folder
  2. Deleted package-lock.json
  3. Using node 18.15.0

"gatsby-source-wordpress": "^7.6.0"

Still, the problem is the same, reverted the slice work, but no luck.

In my case after investing days, I found the at getServerData which i am using in pages folder causing the issue. When I removed this method, a build was created. Now i am trying to debug the issue with this method as same method working on other 4 projects, which i created.

export async function getServerData() {
	try {
		// const res = await fetchFavorite();
		return {
			status: 200,
			props: {
				data: "Server data",
			},
		}
	} catch (error) {
		return {
			status: 500,
			headers: {},
			props: {},
		}
	}
}```

@CloudBop
Copy link

CloudBop commented Sep 2, 2023

In the case of my error #38465 the error seems very closely linked to the reasons I explain in my reply.

@CloudBop
Copy link

CloudBop commented Sep 2, 2023

@insaurabh
Interesting how you've come across this error on SSR, thanks for pointing that out. I've noticed the same happening on another of my websites.

@CloudBop
Copy link

CloudBop commented Sep 3, 2023

@insaurabh @danyim @gustavo-a

I've rolled back to 7.9.0 and this seems to fix both the current issue and also the #38465

@insaurabh
Copy link

@insaurabh @danyim @gustavo-a

I've rolled back to 7.9.0 and this seems to fix both the current issue and also the #38465

Hi @CloudBop

7.9.0 worked for me as well. I rolled back to this version and tested my site, every thing seems fine.
I tried the latest version as well but it was not working, same error was thrown.

Thank you.

@reseau-map
Copy link

Hi !

I have the same issue while upgrading from 4 to 5.
Gatsby develop works, build throws the same error.
I downgraded "gatsby-source-wordpress" to 6.25.5 and it works. 7.9.0 did not work for me.
I had to override some peer dependencies like that :

"overrides": {
    "gatsby-source-wordpress": {
      "gatsby": "^5.13.3",
      "gatsby-plugin-image": "^3.13.1",
      "gatsby-plugin-sharp": "^5.13.1",
      "gatsby-transformer-sharp": "^5.13.1"
    }
  },

Thanks

@Mellis84
Copy link

@insaurabh @danyim @gustavo-a
I've rolled back to 7.9.0 and this seems to fix both the current issue and also the #38465

Hi @CloudBop

7.9.0 worked for me as well. I rolled back to this version and tested my site, every thing seems fine. I tried the latest version as well but it was not working, same error was thrown.

Thank you.

Hey @insaurabh, did you end up getting builds working when using getServerData() ? that seems to be the catalyst for me and I'm pretty desperate for a solution as I need this for Wordpress preview pages.

@Mellis84
Copy link

When flipping the silent bool on the validateEngines function inside Gatsby's validate-engines util to false, the build fail log outputs:

Error: [Immer] minified error nr: 18 'MapSet'. Find the full error at: https://bit.ly/3cXEKWf
Encountered a critical error when running the checkIfSchemaHasChanged build step

@vipinamethi
Copy link

I am getting this error now usnig 7.9.0 with node 18.15.0

image

@insaurabh
Copy link

@insaurabh @danyim @gustavo-a
I've rolled back to 7.9.0 and this seems to fix both the current issue and also the #38465

Hi @CloudBop
7.9.0 worked for me as well. I rolled back to this version and tested my site, every thing seems fine. I tried the latest version as well but it was not working, same error was thrown.
Thank you.

Hey @insaurabh, did you end up getting builds working when using getServerData() ? that seems to be the catalyst for me and I'm pretty desperate for a solution as I need this for Wordpress preview pages.

For that project getServerData() working when rolled back.

@Mellis84
Copy link

Mellis84 commented May 31, 2024

It's so weirdly inconsistent. Sometimes if I remove my node_modules folder and .lock, start a fresh install, it complains with the validation engine error, so i uninstall gatsby-source-wordpress, reinstall to 7.10.1 it works (sometimes). When investigating the validation error more closely (by going into node_modules > gatsby > dist > utils > validate-engines > index.js and setting silent to false ) it looked like the errors were stemming from immer, more precisely @rematch/immer.

Because some other plugins i have like react-redux, were using different versions of immer i had to set some overrides for gatsby-source-wordpress in my package.json

  "overrides": {
    "gatsby-source-wordpress": {
      "@rematch/immer": "1.2.0",
      "immer": "9.0.21"
    }
  }

This fixed it for me but i still can't add certain options in the gatsby-config for gatsby-source-wordpress like presets etc.... such a headache.

@Mellis84
Copy link

Mellis84 commented May 31, 2024

I am getting this error now usnig 7.9.0 with node 18.15.0

image

@vipinamethi try my approach above:

rm -rf node_modules
rm -rf package-lock.json

add "gatsby-source-wordpress": "^7.10.1" to your dependencies

then add

 "overrides": {
    "gatsby-source-wordpress": {
      "@rematch/immer": "1.2.0",
      "immer": "9.0.21"
    }
  }

to your package.json, then npm install.

@g-aubert
Copy link

g-aubert commented Jun 19, 2024

Hello I have the same issue :
bringing my Gatsby v2 site up to v5
gatsby develop is fine

ERROR #98001 ENGINE.VALIDATION

nccwpck_require is not define
/opt/soft/io-gatsby5/.cache/query-engine/index.js

apparently it's a problem with wepack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

8 participants