Support Forums

Validation Error on Build

Today I started seeing a build error for our site https://vibemap.com/, thirsty-northcutt-9dfc94.

My local Gatsby build and the netlify-lambda build works fine locally, and the same site built fine last night.

The following is the error:

ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema.
9:51:46 AM:  - options should be one of these:
9:51:46 AM:    object { resourceRegExp, contextRegExp? } | object { checkResource }
9:51:46 AM:    Details:
9:51:46 AM:     * options misses the property 'resourceRegExp'. Should be:
9:51:46 AM:       RegExp
9:51:46 AM:       -> A RegExp to test the request against.
9:51:46 AM:     * options misses the property 'checkResource'. Should be:
9:51:46 AM:       function
9:51:46 AM:       -> A filter function for resource and context.
9:51:46 AM:     at validate (/opt/build/repo/site/node_modules/schema-utils/dist/validate.js:105:11)
9:51:46 AM:     at /opt/build/repo/site/node_modules/webpack/lib/util/create-schema-validation.js:16:17
9:51:46 AM:     at new IgnorePlugin (/opt/build/repo/site/node_modules/webpack/lib/IgnorePlugin.js:28:3)
9:51:46 AM:     at webpackConfig (/opt/build/repo/site/node_modules/netlify-lambda/lib/build.js:161:7)
9:51:46 AM:     at async Object.exports.run (/opt/build/repo/site/node_modules/netlify-lambda/lib/build.js:208:18) {
9:51:46 AM:   errors: [
9:51:46 AM:     {
9:51:46 AM:       keyword: 'anyOf',
9:51:46 AM:       dataPath: '',
9:51:46 AM:       schemaPath: '#/anyOf',
9:51:46 AM:       params: {},
9:51:46 AM:       message: 'should match some schema in anyOf',
9:51:46 AM:       schema: [Array],
9:51:46 AM:       parentSchema: [Object],
9:51:46 AM:       data: /vertx/,
9:51:46 AM:       children: [Array]
9:51:46 AM:     }
9:51:46 AM:   ],
9:51:46 AM:   schema: { title: 'IgnorePluginOptions', anyOf: [ [Object], [Object] ] },
9:51:46 AM:   headerName: 'Ignore Plugin',
9:51:46 AM:   baseDataPath: 'options',
9:51:46 AM:   postFormatter: null
9:51:46 AM: }
1 Like

Hi @stevepepple,

You seem to have made some builds after this and while one of them succeeded, others failed but with a different error each time. Are you still seeing this issue?

I was receiving the same error, starting at about the same time @stevepepple reports seeing it, and then late yesterday the builds started succeeding again. It failed five times in a row over the span of a few hours with this error message, then started working sometime around 1:45pm MDT. The one that finally succeeded was literally 4 lines of new markdown content and no configuration was changed in our Netlify account by us, so I’m not sure what caused or solved the issue.

Yes, I’m still seeing the issue. I tried a bunch of different .toml configurations, which didn’t resolve the issue, include a configuration I know was working a few days back.

The build appears to have succeeded in a way similar to what @tcmulder described.

That said, I’m seeing the issue again today.

The change we made to our .toml is the following line, in order to support Iframes:

  # Define which paths this specific [[headers]] block will cover.
  for = "/*"

    X-Frame-Options = "SAMEORIGIN"
    X-XSS-Protection = "1; mode=block"
    Content-Security-Policy = "frame-ancestors *"

Oddly enough, it worked fine the first few builds, so could be unrelated. Or maybe somehting regarding the config get’s cached?

I’ve also discovered that removing the lambda build command from the toml, appears to fix it. The same command works fine local.

This breaks the build:

  command = "yarn build:lambda && gatsby build"

This works, it seams:

  command = "gatsby build"

You actually don’t need a command to build lambda - Netlify does it automatically during building.

Okay, thanks, I’ll remove the build:lambda command, and report any other issues.