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

gatsby-plugin-preact 7.6.0 doesn't work with gatsby 5.6.0 #37653

Closed
2 tasks done
amalitsky opened this issue Feb 15, 2023 · 2 comments · Fixed by #37658
Closed
2 tasks done

gatsby-plugin-preact 7.6.0 doesn't work with gatsby 5.6.0 #37653

amalitsky opened this issue Feb 15, 2023 · 2 comments · Fixed by #37658
Assignees
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: plugins Related to plugin system, themes & catch-all for plugins that don't have a label type: bug An issue or pull request relating to a bug in Gatsby

Comments

@amalitsky
Copy link
Contributor

amalitsky commented Feb 15, 2023

Preliminary Checks

Description

After updating gatsby to 5.6.0 and all plugins to the most recent versions build fails on Building production JavaScript and CSS bundles step with the following error:

TypeError: frameworkRegex.test is not a function
  
  - gatsby-node.js:53 webpackConfig.optimization.splitChunks.cacheGroups.framework.test
    [amlabs]/[gatsby-plugin-preact]/gatsby-node.js:53:182

This might be related to #37508, this block in particular.

Preact plugin expects webpackConfig.optimization.splitChunks.cacheGroups.framework.test to be a regex.

Steps to Reproduce

  1. upgrade gatsby to 5.6.0
  2. have gatsby-plugin-preact installed and used by gatsby config
  3. run gatsby build

Expected Result

Build to go through

Actual Result

Error in terminal:

TypeError: frameworkRegex.test is not a function
  
  - gatsby-node.js:53 webpackConfig.optimization.splitChunks.cacheGroups.framework.test
    [amlabs]/[gatsby-plugin-preact]/gatsby-node.js:53:182
  
  - SplitChunksPlugin.js:506 checkTest
    [amlabs]/[webpack]/lib/optimize/SplitChunksPlugin.js:506:10
  
  - SplitChunksPlugin.js:470 
    [amlabs]/[webpack]/lib/optimize/SplitChunksPlugin.js:470:7
  
  - SplitChunksPlugin.js:488 Object.fn [as getCacheGroups]
    [amlabs]/[webpack]/lib/optimize/SplitChunksPlugin.js:488:5
  
  - SplitChunksPlugin.js:1189 
    [amlabs]/[webpack]/lib/optimize/SplitChunksPlugin.js:1189:38
  
  
  - Hook.js:14 Hook.CALL_DELEGATE [as _call]
    [amlabs]/[tapable]/lib/Hook.js:14:14
  
  - Compilation.js:2954 Compilation.seal
    [amlabs]/[webpack]/lib/Compilation.js:2954:36
  
  - Compiler.js:1187 
    [amlabs]/[webpack]/lib/Compiler.js:1187:20
  
  - Compilation.js:2757 
    [amlabs]/[webpack]/lib/Compilation.js:2757:4
  
  
  
  - FlagDependencyExportsPlugin.js:385 
    [amlabs]/[webpack]/lib/FlagDependencyExportsPlugin.js:385:11
  
  - async.js:2830 
    [amlabs]/[neo-async]/async.js:2830:7
  
  - async.js:2850 Object.each
    [amlabs]/[neo-async]/async.js:2850:39
  
  - FlagDependencyExportsPlugin.js:361 
    [amlabs]/[webpack]/lib/FlagDependencyExportsPlugin.js:361:18

Environment

System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.12.1 - /tmp/yarn--1676425124290-0.7439233861384338/node
    Yarn: 1.22.19 - /tmp/yarn--1676425124290-0.7439233861384338/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Languages:
    Python: 3.10.6 - /usr/bin/python
  Browsers:
    Firefox: 110.0
  npmPackages:
    gatsby: ^5.0.x => 5.6.0
    gatsby-plugin-google-tagmanager: ^5.x.x => 5.6.0
    gatsby-plugin-image: ^3.x.x => 3.6.0
    gatsby-plugin-material-ui: ^4.1.0 => 4.1.0
    gatsby-plugin-mdx: ^5.x.x => 5.6.0
    gatsby-plugin-preact: ^7.x.x => 7.6.0
    gatsby-plugin-robots-txt: ^1.8.0 => 1.8.0
    gatsby-plugin-sass: ^6.0.0 => 6.6.0
    gatsby-plugin-sharp: ^5.3.2 => 5.6.0
    gatsby-plugin-sitemap: ^6.0.0 => 6.6.0
    gatsby-plugin-split-css: ^2.0.3 => 2.0.3
    gatsby-plugin-svgr-loader: ^0.1.0 => 0.1.0
    gatsby-remark-copy-linked-files: ^6.0.0 => 6.6.0
    gatsby-remark-images: ^7.0.0 => 7.6.0
    gatsby-source-filesystem: ^5.0.0 => 5.6.0
    gatsby-transformer-sharp: ^5.0.0 => 5.6.0
@amalitsky amalitsky added the type: bug An issue or pull request relating to a bug in Gatsby label Feb 15, 2023
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 15, 2023
@LekoArts LekoArts self-assigned this Feb 15, 2023
@LekoArts LekoArts added status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: plugins Related to plugin system, themes & catch-all for plugins that don't have a label and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 15, 2023
@LekoArts
Copy link
Contributor

Hi!

While I can fix this error, isn't it not working anyways? As per #35500 preact hasn't shipped the necessary server compat modules.

@amalitsky
Copy link
Contributor Author

amalitsky commented Feb 15, 2023

@LekoArts, that's a big mystery to me at the moment - I did come across #35500 but my website is working on 5.5.0.
Might be doing something silly so that preact is not actually active.

Thanks for the fast turnaround! Is there an ETA for the next release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: plugins Related to plugin system, themes & catch-all for plugins that don't have a label type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants