You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm so sorry I can't provide a simple reproduction. I'm using Sharetribe Web Template (which is based on create-react-app) but injecting an Astro rendered site inside it. Also, they Sharetribe customized react-scripts which I also had to modify to add an html-loader. So, as you imagine` the whole setup is a mess.
But I'm really in a hurry to deliver this project so any help or tip on how to hunt this issue down myself is really appreciated.
Also, if this turns out to be a bug in webpack, I don't mind making a PR to fix it.
If the current behavior is a bug, please provide the steps to reproduce.
This issue only happens during build, during dev (handled by start.js script) everything works fine
The issue is that a Chunk contains is emitted which contains an undefined value in the auxiliaryFiles array. Which causes the webpack-manifest-plugin to throw the famous The "path" argument must be of type string. Received undefined error.
I updated both webpack and webpack-manifest-plugin to the latest version and the error persists.
HookWebpackError: The "path" argument must be of type string. Received undefined
at makeWebpackError (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack/lib/HookWebpackError.js:48:9)
at /Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack/lib/Compilation.js:3075:12
at eval (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
at fn (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack/lib/Compilation.js:481:17)
at _next7 (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
at eval (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
at eval (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
-- inner error --
TypeError: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:405:5)
at validateString (node:internal/validators:162:11)
at Object.basename (node:path:1308:5)
at /Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/helpers.js:66:26
at Array.forEach (<anonymous>)
at Object.reduceChunk (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/helpers.js:60:44)
at /Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/hooks.js:43:82
at Array.reduce (<anonymous>)
at WebpackManifestPlugin.emit (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/hooks.js:43:48)
at /Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/index.js:66:72
at fn (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack/lib/Compilation.js:479:10)
at _next7 (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
at eval (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
at eval (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
caused by plugins in Compilation.hooks.processAssets
TypeError: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:405:5)
at validateString (node:internal/validators:162:11)
at Object.basename (node:path:1308:5)
at /Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/helpers.js:66:26
at Array.forEach (<anonymous>)
at Object.reduceChunk (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/helpers.js:60:44)
at /Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/hooks.js:43:82
at Array.reduce (<anonymous>)
at WebpackManifestPlugin.emit (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/hooks.js:43:48)
at /Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack-manifest-plugin/dist/index.js:66:72
at fn (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/webpack/lib/Compilation.js:479:10)
at _next7 (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
at eval (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
at eval (eval at create (/Users/svallory/projects/calligo/workspace/repos/scripts/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
What is the expected behavior?
I believe webpack shouldn't have an undefined in the set of chunk.auxiliaryFiles
Other relevant information:
webpack version: 5.90.3
Node.js version: 18.18.2
Operating System: OS X
Additional tools:
The text was updated successfully, but these errors were encountered:
Sounds like a bug in non official webpack plugin, we need reproducible test repo to fix a place
As I said, I don't mind hunting it down. The error blows up in webpack-manifest-loader but the real issue is that the main chunk is generated with an undefined value in the axuiliaryFiles.
I checked the documentation but did not find a good explanation of how chunks are created in webpack.
With some guidance, mainly regarding how chunks are created in webpack and what's the role of loaders in it, I could isolate the real culprit and create a reproduction.
Bug report
I'm so sorry I can't provide a simple reproduction. I'm using Sharetribe Web Template (which is based on create-react-app) but injecting an Astro rendered site inside it. Also, they Sharetribe customized
react-scripts
which I also had to modify to add anhtml-loader
. So, as you imagine` the whole setup is a mess.But I'm really in a hurry to deliver this project so any help or tip on how to hunt this issue down myself is really appreciated.
Also, if this turns out to be a bug in webpack, I don't mind making a PR to fix it.
The react-scripts can be found here: https://github.com/tokilabs/calligo-sharetribe-scripts/tree/master/packages/react-scripts
Some files of interest:
config/webpack.config.js
config/sharetribeWebpackConfig.js
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
This issue only happens during build, during dev (handled by
start.js
script) everything works fineThe issue is that a Chunk contains is emitted which contains an
undefined
value in theauxiliaryFiles
array. Which causes thewebpack-manifest-plugin
to throw the famousThe "path" argument must be of type string. Received undefined
error.I updated both webpack and
webpack-manifest-plugin
to the latest version and the error persists.Stack Trace
What is the expected behavior?
I believe webpack shouldn't have an
undefined
in the set ofchunk.auxiliaryFiles
Other relevant information:
webpack version: 5.90.3
Node.js version: 18.18.2
Operating System: OS X
Additional tools:
The text was updated successfully, but these errors were encountered: