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

Uncaught TypeError: {(intermediate value)} is not a function #53

Open
shymkovayu opened this issue Jun 13, 2023 · 1 comment
Open

Uncaught TypeError: {(intermediate value)} is not a function #53

shymkovayu opened this issue Jun 13, 2023 · 1 comment

Comments

@shymkovayu
Copy link

Hello!

After updating to Webpack 5, I've run into an issue with the plugin. Everything builds fine if I remove the plugin, but if it's present I get this error:
{(intermediate value)} is not a function

Screenshot 2023-06-13 at 13 57 43 Screenshot 2023-06-13 at 13 58 10

My setup:
"react": "^17.0.2",
"shakapacker": "^6.6.0",
"webpack": "^5.85.1",
"webpack-dev-server": "^4.15.0"
"webpack-assets-manifest": "^5.1.0",
"webpack-cli": "^5.1.3",
"webpack-merge": "^5.9.0",
"webpack-retry-chunk-load-plugin": "^3.1.1", (I've tried 2.2.0 too)
"webpack-sources": "^3.2.3",

From webpack.config.dump (plugins part is the same with the plugin and without it):

optimization: {
    splitChunks: {
      chunks: 'all',
      minSize: 500000,
      minChunks: 1,
      maxAsyncRequests: 5,
      maxInitialRequests: 3,
      automaticNameDelimiter: '~'
    }
  },
output: {
    chunkFilename: '[name]-chunk-[contenthash].js',
    enabledChunkLoadingTypes: [ '...' ],
    enabledLibraryTypes: [ '...' ],
    enabledWasmLoadingTypes: [ '...' ],
    filename: '[name]-[contenthash].js',
    hotUpdateChunkFilename: 'js/[id].[fullhash].hot-update.js',
    path: '/public/packs',
    publicPath: '/packs/'
  },
plugins: [
    {
      cleanStaleWebpackAssets: true,
      protectWebpackAssets: true,
      outputPath: '/public/packs'
    },
    { resourceRegExp: /moment[\/\\]locale/, newContentRegExp: /\b\B/ },
    { outputPath: './', name: 'webpack.config.dump', depth: 4 }
  ],

Any thoughts/advices on how to resolve this? Any additional info needed?

@bluthen
Copy link

bluthen commented Jun 21, 2023

To me it looks liked installedCssChunks is missing a simicolan after }

I don't see css chunks support in my version of webpack, is there another plugin that chunks css that you use that maybe I'm not seeing? Maybe old version 4 extract-css-chunks-webpack-plugin?

I don't know if that is it, but hope it helps.

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