egg-vue-webpack-boilerplate icon indicating copy to clipboard operation
egg-vue-webpack-boilerplate copied to clipboard

启动时报错:nodejs.ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema

Open bravelin opened this issue 3 years ago • 1 comments

node version v12.20.0 2022-02-15 16:50:31,243 INFO 8128 [master] egg version 2.33.1 2022-02-15 16:50:32,839 ERROR 11068 nodejs.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.
  • 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 (G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\webpack\node_modules\schema-utils\dist\validate.js:105:11) at G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\webpack\lib\util\create-schema-validation.js:16:17 at new IgnorePlugin (G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\webpack\lib\IgnorePlugin.js:28:3) at G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\easywebpack\lib\core\plugin.js:184:22 at Array.forEach () at WebpackServerBuilder.createPlugin (G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\easywebpack\lib\core\plugin.js:152:26) at WebpackServerBuilder.createWebpackPlugin (G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\easywebpack\lib\core\plugin.js:217:17) at WebpackServerBuilder.combineWebpackConfig (G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\easywebpack\lib\target\base.js:143:21) at WebpackServerBuilder.create (G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\easywebpack\lib\target\base.js:164:17) at G:\1\packages\egg-vue-webpack-spa-boilerplate\node_modules\easywebpack\lib\builder.js:168:61 name: "ValidationError" errors: [{"keyword":"anyOf","dataPath":"","schemaPath":"#/anyOf","params":{},"message":"should match some schema in anyOf","schema":[{"type":"object","additionalProperties":false,"properties":{"contextRegExp":{"description":"A RegExp to test the context (directory) against.","instanceof":"RegExp","tsType":"RegExp"},"resourceRegExp":{"description":"A RegExp to test the request against.","instanceof":"RegExp","tsType":"RegExp"}},"required":["resourceRegExp"]},{"type":"object","additionalProperties":false,"properties":{"checkResource":{"description":"A filter function for resource and context.","instanceof":"Function","tsType":"((resource: string, context: string) => boolean)"}},"required":["checkResource"]}],"parentSchema":{"title":"IgnorePluginOptions","anyOf":"~0~schema"},"data":"/\.(css|less|scss|sass|styl|stylus)$/","children":[{"keyword":"required","dataPath":"","schemaPath":"#/anyOf/0/required","params":{"missingProperty":"resourceRegExp"},"message":"should have required property 'resourceRegExp'","schema":"~0~schema~0~properties","parentSchema":"~0~schema~0","data":"/\.(css|less|scss|sass|styl|stylus)$/"},{"keyword":"required","dataPath":"","schemaPath":"#/anyOf/1/required","params":{"missingProperty":"checkResource"},"message":"should have required property 'checkResource'","schema":"~0~schema~1~properties","parentSchema":"~0~schema~1","data":"/\.(css|less|scss|sass|styl|stylus)$/"}]}] schema: {"title":"IgnorePluginOptions","anyOf":[{"type":"object","additionalProperties":false,"properties":{"contextRegExp":{"description":"A RegExp to test the context (directory) against.","instanceof":"RegExp","tsType":"RegExp"},"resourceRegExp":{"description":"A RegExp to test the request against.","instanceof":"RegExp","tsType":"RegExp"}},"required":["resourceRegExp"]},{"type":"object","additionalProperties":false,"properties":{"checkResource":{"description":"A filter function for resource and context.","instanceof":"Function","tsType":"((resource: string, context: string) => boolean)"}},"required":["checkResource"]}]} headerName: "Ignore Plugin" baseDataPath: "options" postFormatter: null message: "Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema.\n - options should be one of these:\n object { resourceRegExp, contextRegExp? } | object { checkResource }\n Details:\n * options misses the property 'resourceRegExp'. Should be:\n RegExp\n -> A RegExp to test the request against.\n * options misses the property 'checkResource'. Should be:\n function\n -> A filter function for resource and context." pid: 11068

bravelin avatar Feb 15 '22 09:02 bravelin

同上

WinfredWang avatar Feb 24 '22 11:02 WinfredWang