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

Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema #33216

Closed
2 tasks done
Ajwah opened this issue Sep 16, 2021 · 29 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@Ajwah
Copy link

Ajwah commented Sep 16, 2021

Preliminary Checks

Description

 ERROR

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.



  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.

  - validate.js:105 validate
    [test]/[webpack]/[schema-utils]/dist/validate.js:105:11

  - create-schema-validation.js:16
    [test]/[webpack]/lib/util/create-schema-validation.js:16:17

  - IgnorePlugin.js:28 new IgnorePlugin
    [test]/[webpack]/lib/IgnorePlugin.js:28:3

  - webpack-plugins.ts:16 Object.ignore
    [test]/[gatsby]/src/utils/webpack-plugins.ts:16:12

  - webpack-utils.ts:768 Object.moment
    [test]/[gatsby]/src/utils/webpack-utils.ts:768:13

  - webpack.config.js:211 getPlugins
    [test]/[gatsby]/src/utils/webpack.config.js:211:15

  - webpack.config.js:512 module.exports
    [test]/[gatsby]/src/utils/webpack.config.js:512:14

  - build-html.ts:181 buildRenderer
    [test]/[gatsby]/src/commands/build-html.ts:181:18

  - start-server.ts:117 createIndexHtml
    [test]/[gatsby]/src/utils/start-server.ts:117:32

  - start-server.ts:155 startServer
    [test]/[gatsby]/src/utils/start-server.ts:155:5

  - start-webpack-server.ts:44 startWebpackServer
    [test]/[gatsby]/src/services/start-webpack-server.ts:44:7

Reproduction Link

No need

Steps to Reproduce

  1. npm init gatsby (barebones installation. no selections)
  2. npm run develop

Expected Result

Opens browser local project

Actual Result

Error

Environment

System:
    OS: macOS 11.5.1
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.6.1 - ~/.asdf/installs/nodejs/16.6.1/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 7.20.3 - ~/.asdf/plugins/nodejs/shims/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 93.0.4577.82
    Firefox: 92.0
    Safari: 14.1.2
  npmPackages:
    gatsby: ^3.13.0 => 3.13.0
  npmGlobalPackages:
    gatsby: 3.13.0

Config Flags

no. barebones project

@Ajwah Ajwah added the type: bug An issue or pull request relating to a bug in Gatsby label Sep 16, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 16, 2021
@nooxx
Copy link

nooxx commented Sep 16, 2021

Same issue here

@nickloeper
Copy link

nickloeper commented Sep 16, 2021

Webpack just released 5.53.0 which introduced this issue about an hour ago webpack/webpack#14265. This seems to be breaking on all Gatsby 3 versions for fresh installs.

@barbalex
Copy link

So basically all versions of gatsby can not be used right now? 😱

@nickloeper
Copy link

This is only breaking for me on fresh installs since it is pulling the latest version of Webpack. If you have an existing lock file that has a previous version of webpack, you should be good until this is patched. If you are doing a fresh install, until this is fixed, you can use resolutions and choose a version < 5.53.0.

@barbalex
Copy link

  "resolutions": {
    "webpack": "5.52.1"
  },

works for me

@jreyes88
Copy link

Hi everyone, also getting this error this morning on a fresh GatsbyJS project.

@NeffCodes
Copy link

Same error, after updating

@TylerAPfledderer
Copy link

Hey @barbalex! Are you using the Force Resolutions Plugin for the resolutions property or do you use Yarn or doing something else?

@barbalex
Copy link

I am using yarn

@alana314
Copy link

+1

1 similar comment
@avrilpearl
Copy link

+1

@KyleAMathews
Copy link
Contributor

This PR made previously optional parameters required webpack/webpack#14211

@tdfirth
Copy link

tdfirth commented Sep 16, 2021

+1 !

This was referenced Sep 16, 2021
@Ayush-v
Copy link

Ayush-v commented Sep 16, 2021

same error.! don't know what to do. maybe this won't take too long to fix.

@Ayush-v
Copy link

Ayush-v commented Sep 16, 2021

I am using yarn

not working either

@jonsherrard
Copy link

The resolutions field only works for nested dependencies if you're using Yarn.

Unfortunately I cannot switch over to Yarn.

I see there's a commit to pin webpack in Gatsby v3 in the meantime? Will that be installable soon?

@damnitrahul
Copy link

+1, Confirmed. Hopefully, this will be fixed soon.

@graysonhicks
Copy link
Contributor

Fix PR is merged, waiting on release 👍

@jonsherrard
Copy link

Just out of interest @graysonhicks, which PR contains the fix? Learning opportunity for me to understand the nuts and bolts of Gatsby a bit better 😄

@snibbo71
Copy link

snibbo71 commented Sep 16, 2021

I rather wish I'd come here earlier, I might have some hair left if I had ;)

Will chill out now and wait for the new release - thanks @graysonhicks

Fix PR is merged, waiting on release 👍

@graysonhicks
Copy link
Contributor

graysonhicks commented Sep 16, 2021

#33222

Fixes the underlying webpack issue (I believe this was fixed a few days ago when webpack made the change, and fixed on v4 branch but wasn't backported to v3).

@graysonhicks
Copy link
Contributor

Fix published with 3.13.1

@pieh

@jonsherrard
Copy link

Works for me!

@snibbo71
Copy link

Works for me!

Yep, looking good. That's absolutely fantastic service, thanks to everyone involved!

@pragmaticpat
Copy link
Contributor

Confirmed as fixed, closing the issue - thank you @Ajwah for reporting!

@jonmadison
Copy link

thanks for the speedy fix! I've gotten past that issue and now have one with my remark markdown parser (needed for parsing the source code from my dev team) but for now, npm install assert --save works.

@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 20, 2021
Limezy added a commit to YunoHost-Apps/outline_ynh that referenced this issue Sep 21, 2021
webpack 5.52.1 to prevent gatsbyjs/gatsby#33216 issue
WayneHemsleyCRI added a commit to croner-i-web/progression-framework that referenced this issue Oct 5, 2021
@krichey15
Copy link

krichey15 commented Oct 10, 2021

Fix published with 3.13.1

@pieh

@pragmaticpat & @graysonhicks I am using Gatsby 3.2 and still experiencing this issue

@graysonhicks
Copy link
Contributor

@krichey15 You will need 3.13.1+.

Limezy added a commit to YunoHost-Apps/outline_ynh that referenced this issue Nov 9, 2021
Simple readme

Delete php-fpm.conf

Delete example.jpg

Create LICENSE

Update manifest.json

First install script version

Update README.md

Correct manifest.json

Corrupted JSON read from /var/cache/yunohost/app_tmp_work_dirs/app_c_1x8jdd/manifest.json

Correct manifest.json 2

Corrupted JSON read from /var/cache/yunohost/app_tmp_work_dirs/app_msxp50v0/manifest.json (reason: Expecting value: line 29 column 5 (char 888))

Add checksum

Info: DEBUG - + ynh_die '--message=Corrupt source'

Add app name

Correct checksum

Install node v14 instead of 10

Add webpack-cli dependancy

Revert "Add webpack-cli dependancy"

This reverts commit 038d391.

Trying to solve webpack problem

Revert "Trying to solve webpack problem"

This reverts commit 64e9561.

Update install

Try --non-interactive option

Update install

try yarn add webpack --dev

Update install

Try -save-dev

Update install

yarn install webpack -D

Update install

yarn add webpack --dev

Update install

webpack 5.52.1 to prevent gatsbyjs/gatsby#33216 issue

Update install

Try removing --production

Update install

First complete install ?

First try slack

Update NOTES.md

DB name ?

Correct db name

Correct nginx error

Correct .env

Add db migration to install script

Correct db name and init

Setup remove db

Correct DB migration

Correct DB migration 2

Correct DB name in .env

Update README.md
Limezy added a commit to YunoHost-Apps/outline_ynh that referenced this issue Nov 9, 2021
Simple readme

Delete php-fpm.conf

Delete example.jpg

Create LICENSE

Update manifest.json

First install script version

Update README.md

Correct manifest.json

Corrupted JSON read from /var/cache/yunohost/app_tmp_work_dirs/app_c_1x8jdd/manifest.json

Correct manifest.json 2

Corrupted JSON read from /var/cache/yunohost/app_tmp_work_dirs/app_msxp50v0/manifest.json (reason: Expecting value: line 29 column 5 (char 888))

Add checksum

Info: DEBUG - + ynh_die '--message=Corrupt source'

Add app name

Correct checksum

Install node v14 instead of 10

Add webpack-cli dependancy

Revert "Add webpack-cli dependancy"

This reverts commit 038d391.

Trying to solve webpack problem

Revert "Trying to solve webpack problem"

This reverts commit 64e9561.

Update install

Try --non-interactive option

Update install

try yarn add webpack --dev

Update install

Try -save-dev

Update install

yarn install webpack -D

Update install

yarn add webpack --dev

Update install

webpack 5.52.1 to prevent gatsbyjs/gatsby#33216 issue

Update install

Try removing --production

Update install

First complete install ?

First try slack

Update NOTES.md

DB name ?

Correct db name

Correct nginx error

Correct .env

Add db migration to install script

Correct db name and init

Setup remove db

Correct DB migration

Correct DB migration 2

Correct DB name in .env

Update README.md
mttschltz added a commit to mttschltz/life that referenced this issue Dec 12, 2021
Lifts webpack dependencies to root, which solves an issue where webpack
was asking to install webpack-cli.

Updates Gatsby to 3.13.1 to solve an issue with webpack not building.
gatsbyjs/gatsby#33216 (comment)
@1-800-jono
Copy link
Contributor

Using Gatsby v4.25.7 - just updated to webpack v5.61.0 (also webpack5.88.0) and seeing this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests