Skip to content

Conversation

MoOx
Copy link
Contributor

@MoOx MoOx commented May 27, 2022

Just got this

ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema.
 - options should be one of these:
   object { resourceRegExp, contextRegExp? } | object { checkResource }
   Details:
    * options misses the property 'resourceRegExp'. Should be:
      RegExp
      -> A RegExp to test the request against.
    * options misses the property 'checkResource'. Should be:
      function
      -> A filter function for resource and context.
    at validate (~/node_modules/next/dist/compiled/schema-utils3/index.js:1:150822)
    at ~/node_modules/next/dist/compiled/webpack/bundle5.js:126431:17
    at new IgnorePlugin (~/node_modules/next/dist/compiled/webpack/bundle5.js:42929:3)
    at Object.webpack (~/next.config.js:46:27)
    at Object.webpack (~/node_modules/next-transpile-modules/src/next-transpile-modules.js:255:29)
    at Object.newWebpackFunction [as webpack] (~/node_modules/@sentry/nextjs/dist/config/webpack.js:40:40)
    at Object.getBaseWebpackConfig [as default] (~/node_modules/next/dist/build/webpack-config.js:1186:32)
    at async Promise.all (index 0)
    at async Span.traceAsyncFn (~/node_modules/next/dist/trace/trace.js:79:20)
    at async Span.traceAsyncFn (~/node_modules/next/dist/trace/trace.js:79:20) {
  errors: [
    {
      keyword: 'anyOf',
      dataPath: '',
      schemaPath: '#/anyOf',
      params: {},
      message: 'should match some schema in anyOf',
      schema: [Array],
      parentSchema: [Object],
      data: /lib\/server/,
      children: [Array]
    }
  ],
  schema: { title: 'IgnorePluginOptions', anyOf: [ [Object], [Object] ] },
  headerName: 'Ignore Plugin',
  baseDataPath: 'options',
  postFormatter: null
}

I checked official webpack docs: https://webpack.js.org/plugins/ignore-plugin/

@rrdelaney
Copy link
Contributor

Thanks for the update! Sometimes it can be hard to ensure instructions like these are always up to date

@rrdelaney rrdelaney merged commit 9269a1c into RevereCRE:main May 28, 2022
@MoOx MoOx deleted the patch-2 branch May 28, 2022 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants