gatsby: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
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
npm init gatsby
(barebones installation. no selections)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
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 21
- Comments: 29 (7 by maintainers)
Commits related to this issue
- Update install webpack 5.52.1 to prevent https://github.com/gatsbyjs/gatsby/issues/33216 issue — committed to YunoHost-Apps/outline_ynh by Limezy 3 years ago
- npm update: gatsby 3.5.0 -> 3.14.1. This is to fix this issue: https://github.com/gatsbyjs/gatsby/issues/33216 — committed to croner-i-web/progression-framework by WayneHemsleyCRI 3 years ago
- Initial commit 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... — committed to YunoHost-Apps/outline_ynh by Limezy 3 years ago
- Initial commit 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... — committed to YunoHost-Apps/outline_ynh by Limezy 3 years ago
- Fix build issues with webpack and Gatsby dependencies 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 ... — committed to mttschltz/life by mttschltz 3 years ago
Fix published with 3.13.1
@pieh
works for me
So basically all versions of gatsby can not be used right now? 😱
Webpack just released 5.53.0 which introduced this issue about an hour ago https://github.com/webpack/webpack/discussions/14265. This seems to be breaking on all Gatsby 3 versions for fresh installs.
I am using yarn
Works for me!
Fix PR is merged, waiting on release 👍
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.
https://github.com/gatsbyjs/gatsby/pull/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).
Hey @barbalex! Are you using the Force Resolutions Plugin for the resolutions property or do you use Yarn or doing something else?
Hi everyone, also getting this error this morning on a fresh GatsbyJS project.
Same issue here