-
-
Notifications
You must be signed in to change notification settings - Fork 284
ERROR in The "path" argument must be of type string. Received an instance of Object #496
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
Comments
Without reproducible test repo I can't help, sorry |
Minimum - please provide full stack trace of an error |
@blasterbug You should update how you call module.exports = () => ({
//...
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: 'public',
globOptions: {
ignore: ['public/service-worker.js'],
},
},
],
}),
],
)} |
Also mini-css-extract-plugin and copy-webpack-plugin uses difference hooks, please update the issue using template and I will reopen the issue, can't help without configurations/reproducible test repo/reproducible steps |
this is how I set up the copy plugin: new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, 'public'),
to: path.resolve(__dirname, 'dist'),
globOptions: {
dot: true,
gitignore: true,
ignore: [
'*.html',
'*.svg',
],
},
},
],
}), And this what I've got:
|
@blasterbug Reproduced |
Looks like bug in |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
With copy-webpack-plugin 6.0.3, I'm also getting "ERROR in The "path" argument must be of type string. Received an instance of Object". The error is just that, no additional information and there is no clear indication that the failure is coming from copy-webpack-plugin (but it definitely is). The error goes away if I do not use gitignore: true My configuration:
|
@gregbenz Feel free to send a fix to |
@evilebottnawi Sorry, I'm not sure what you mean. What would I do to use the gitignore flag without errors? |
Send a fix to |
It is not problem by typescript, it is problem in |
Thank you for catching that, I had multiple tabs opened and copied to the wrong one. Deleted from TS and added to globby. |
I got same errors after the upgrade the plugin both of them its working with this configs const htmlPackPlugin = new HtmlWebPackPlugin({
filename: 'index.html',
template: 'src/public/index.html',
hash: true,
});
const webpackCopyPlugin = new CopyWebpackPlugin({
patterns: [
{
from: 'src/public',
globOptions: { ignore: ['svg/*', '*.html', 'images/*'] },
},
],
}); |
When compiling after updating from copy-webpack-plugin@6.0.0 to 6.0.1, I got this error (that seems be thrown by mini-css-extract-plugin).
"""
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
"""
I am not sure if it's an actual bug, but I post this here since the only thing that changed when I got this error is the version for mini-css-extract-plugin.
I can try to make a minimal project to reproduce the errors, but seems overkill for me right now.
The text was updated successfully, but these errors were encountered: