-
Notifications
You must be signed in to change notification settings - Fork 135
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
clean-webpack-plugin: /Users/user/.../ must be inside the project root. Skipping... #10
Comments
I am having the same issue. |
I am having the same issue as well. My project root is "z:/" , and I'm trying to delete 'dist' folder, which path is 'z:/dist'. |
@fr-ench please provide your config. |
@chrisblossom, here it is: var Clean = require('clean-webpack-plugin'); I've also tried root options as '/' but no help unfortunately. |
Give a try It did worked for me! |
@hatchbee , unfortunately, I'm still getting the same error: |
My webpack.config.js: new CleanPlugin(['build'], { root: __dirname }) My project structure:
I don't think that |
@fr-ench what is your Make sure you absolutely target the folder. I did tried a lot and what to bang my head but then tried I have this project structure:
The config below also worked for me:
And I am bundling with this command from my root of the project:
Make sure you give correct root path. |
@hatchbee, That doesn't help either. Actually I believe the bug is on line 63: I have projectDir = "z:/" which produces an array ["z:", ""]. There is an excessive empty array element "" in the end. So we're getting an excessive check here projectDirSplit.forEach((function(singleDir, index) { which results in insideFailCheck = true; Probably your root variable doesn't end with a path separator, that is why it's working for you. But I use subst command to mount a "z:" drive and work from z:/ directly so just changing the plugin settings won't work for me. |
@fr-ench just double check the way |
The tests are failing on windows. I am looking into a solution right now. Thanks for the input @fr-ench. Side note (haven't researched), is it possible for Travis-ci to test on windows hosts as well? |
@fr-ench can you try again with case-sensitive inputs including a capital Z:? I think this is the issue. |
@fr-ench Can you try this branch: https://github.com/chrisblossom/clean-webpack-plugin/tree/feature/windows_fixes and see if your issues are fixed? Please advise. |
The windows_fixes branch works just perfect for me! Thank you! As for case sensitivity, I don't think that was the case, because I tried different cominations at the very beginning. |
I get this error after updating to 0.1.6.
If i revert to 0.1.4, it works fine. Is it possible to add an option to clean outside project root in the upcoming versions?
The text was updated successfully, but these errors were encountered: