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

Facing issue #140

Open
Codecrewtech opened this issue Sep 22, 2021 Discussed in #139 · 3 comments
Open

Facing issue #140

Codecrewtech opened this issue Sep 22, 2021 Discussed in #139 · 3 comments

Comments

@Codecrewtech
Copy link

Discussed in #139

Originally posted by Codecrewtech September 22, 2021
⠋ Compiling...C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules@hayes0724\shopify-packer\cli\commands\build.js:19
if (err) throw err;
^

Error: Compiling RuleSet failed: Unexpected property test in condition (at ruleSet[1].rules[1].resource.test: resource => {
currentResource = resource
return true
})
at RuleSetCompiler.error (C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\RuleSetCompiler.js:373:10)
at RuleSetCompiler.compileCondition (C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\RuleSetCompiler.js:309:17)
at C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\BasicMatcherRulePlugin.js:29:40
at Hook.eval [as call] (eval at create (C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\tapable\lib\HookCodeFactory.js:19:10), :19:1)
at RuleSetCompiler.compileRule (C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\RuleSetCompiler.js:177:19)
at C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\RuleSetCompiler.js:154:9
at Array.map ()
at RuleSetCompiler.compileRules (C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\RuleSetCompiler.js:153:16)
at RuleSetCompiler.compileRule (C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\RuleSetCompiler.js:184:30)
at C:\Users\codec\AppData\Local\Yarn\Data\global\node_modules\webpack\lib\rules\RuleSetCompiler.js:154:9

I am facing this issue while running yarn deploy command.

@marioloncarek
Copy link

can you provide
node -v
packer -v
npm - v

@Codecrewtech
Copy link
Author

can you provide
node -v
packer -v
npm - v

node -v 14.7.4
packer -v 2.2.0
npm - v 6.14.14

@Codecrewtech
Copy link
Author

S D:\directory> yarn deploy
yarn run v1.22.11
$ packer build && packer deploy --nodelete
Custom webpack configuration found D:\directory\prod.config.js
D:\directory\node_modules\schema-utils\dist\validate.js:105
throw new _ValidationError.default(errors, schema, configuration);
^

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 (D:\directory\node_modules\schema-utils\dist\validate.js:105:11)
      at D:\directory\node_modules\webpack\lib\util\create-schema-validation.js:16:17
      at new IgnorePlugin (D:\directory\node_modules\webpack\lib\IgnorePlugin.js:28:3)
      at Object. (D:\directory\prod.config.js:41:5)
      at Module._compile (internal/modules/cjs/loader.js:1072:14)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
      at Module.load (internal/modules/cjs/loader.js:937:32)
      at Function.Module._load (internal/modules/cjs/loader.js:778:12)
      at Module.require (internal/modules/cjs/loader.js:961:19)
      at require (internal/modules/cjs/helpers.js:92:18) {
      errors: [
      {
      keyword: 'anyOf',
      dataPath: '',
      schemaPath: '#/anyOf',
      params: {},
      message: 'should match some schema in anyOf',
      schema: [
      {
      type: 'object',
      additionalProperties: false,
      properties: { contextRegExp: [Object], resourceRegExp: [Object] },
      required: [ 'resourceRegExp' ]
      },
      {
      type: 'object',
      additionalProperties: false,
      properties: { checkResource: [Object] },
      required: [ 'checkResource' ]
      }
      ],
      parentSchema: {
      title: 'IgnorePluginOptions',
      anyOf: [
      {
      type: 'object',
      additionalProperties: false,
      properties: [Object],
      required: [Array]
      },
      {
      type: 'object',
      additionalProperties: false,
      properties: [Object],
      required: [Array]
      }
      ]
      },
      data: /^./locale$/,
      children: [
      {
      keyword: 'required',
      dataPath: '',
      schemaPath: '#/anyOf/0/required',
      params: { missingProperty: 'resourceRegExp' },
      message: "should have required property 'resourceRegExp'",
      schema: { contextRegExp: [Object], resourceRegExp: [Object] },
      parentSchema: {
      type: 'object',
      additionalProperties: false,
      properties: [Object],
      required: [Array]
      },
      data: /^./locale$/,
      children: undefined
      },
      {
      keyword: 'required',
      dataPath: '',
      schemaPath: '#/anyOf/1/required',
      params: { missingProperty: 'checkResource' },
      message: "should have required property 'checkResource'",
      schema: { checkResource: [Object] },
      parentSchema: {
      type: 'object',
      additionalProperties: false,
      properties: [Object],
      required: [Array]
      },
      data: /^./locale$/,
      children: undefined
      }
      ]
      }
      ],
      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
      }

FAcing this issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants