gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.13k stars 10.33k forks source link

failed Validating Rendering Engines in strict mode #38973

Open mvurro opened 1 month ago

mvurro commented 1 month ago

Preliminary Checks

Description

I'm trying to develop createPages by adding the defer:true attribute in gatsby-node.js, during build I get the following error:

failed Validating Rendering Engines - 0.965s

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: Module build failed (from ./node_modules/gatsby/dist/utils/webpack/loaders/webpack-remove-exports-loader.js) : SyntaxError: C:\Documents\Projects\Whitehall Reply\dev\mds-np-gatsbydrupal\gatsby-node.js: Assigning to 'arguments' in strict mode. (250:2) 248 | view, 249 | display = 'default',

250 | arguments = [], | ^ 251 | { getNode, cache } 252 | ) => { 253 | const { createNodeId } = require('gatsby/dist/utils/create-node-id ');

I followed the following documentation:

https://www.gatsbyjs.com/docs/reference/rendering-options/deferred-static-generation/

Thank you Cordial greetings

Reproduction Link

https://github.com/mvurro/Reproduction-Gatsbyjs-Bug

Steps to Reproduce

  1. npm run clean
  2. npm run build
  3. ...

Expected Result

The build should complete without stric errors

Actual Result

failed Validating Rendering Engines - 0.965s

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: Module build failed (from ./node_modules/gatsby/dist/utils/webpack/loaders/webpack-remove-exports-loader.js) : SyntaxError: C:\Documenti\Progetti\Whitehall Reply\dev\mds-np-gatsbydrupal\gatsby-node.js: Assigning to 'arguments' in strict mode. (250:2) 248 | view, 249 | display = 'default',

250 | arguments = [], | ^ 251 | { getNode, cache } 252 | ) => { 253 | const { createNodeId } = require('gatsby/dist/utils/create-node-id ');

not finished Running gatsby.IMAGE_CDN jobs - 251.792s not finished Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 116.629s

Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
  npmPackages:
    gatsby: ^5.10.0 => 5.10.0
    gatsby-plugin-breadcrumb: ^12.3.1 => 12.3.2
    gatsby-plugin-breakpoints: ^1.3.10 => 1.3.10
    gatsby-plugin-buildtime-timezone: ^1.0.3 => 1.0.3
    gatsby-plugin-catch-links: ^5.10.0 => 5.10.0
    gatsby-plugin-image: ^3.10.0 => 3.10.0
    gatsby-plugin-react-svg: ^3.3.0 => 3.3.0
    gatsby-plugin-sass: ^6.10.0 => 6.10.0
    gatsby-plugin-schema-snapshot: ^4.10.0 => 4.10.0
    gatsby-plugin-sharp: ^5.10.0 => 5.10.0
    gatsby-plugin-sitemap: ^6.11.0 => 6.11.0
    gatsby-plugin-styled-components: ^6.13.1 => 6.13.1
    gatsby-source-drupal: ^6.13.1 => 6.13.1
    gatsby-source-filesystem: ^5.10.0 => 5.13.1
    gatsby-transformer-sharp: ^5.10.0 => 5.10.0

Config Flags

No response