Intellij 2017.2 automatically delete genereted folder by webpack.

Hay,

Im using Webpack and Intellij the newest version - 2017.2

And after update when I use 

webpack --watch

command it randomly (sometimes) delete folder generated by webpack.

I tried a lot of thing but I can't solve it.

Please help me.

17 comments
Comment actions Permalink

haven't heard of such issues. Why do you think that the folder is deleted by IDEA? It doesn't normally delete any folders

0
Comment actions Permalink

Because it began when I downloaded the newest version of intelij I mean 2017.2

0
Comment actions Permalink

Post hoc, non est propter hoc :)

Sample project plus steps to repeat would be helpful

0
Comment actions Permalink

I can't send you any parft of my current project, but here is some webpack with react boilerplate :

https://github.com/srn/react-webpack-boilerplate

 

And when we add to npm (package.json file) "scripts" like : 

"build": "webpack --display-error-details",
"build:watch": "webpack --watch",

and when we run in console :

$ npm build
or
$ npm build:watch

It sometimes delete webpack destination folder.

0
Comment actions Permalink

There is possible that IDE can't have enought memory to finish some actions and it close processing of them ?

0
Comment actions Permalink

Even if the IDE runs out of memory, it doesn't delete source files. IDE crash may result in losing unsaved files created in IDE. But in your case files generation is performed outside of the IDE, by webpack run in terminal. So IDE memory issues can hardly affect them

0
Comment actions Permalink

But web pack when do rebuild first delete destination folder then recreate it.
And I have theory that intellij somehow, and sometimes when webpack rebuild solution from watch mode or build configuration (->) stop building process when the files are deleted and webpack process is killed bcs of intellij and it can't recreate destinaiton folder.

0
Comment actions Permalink

How can IDEA kill the external process it has no control on? Looks like webpack crashes for some reason, and building is not completed, leaving the target directory empty

0
Comment actions Permalink

It has control bcs I configured commands throught IDE :

0
Comment actions Permalink

in https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000466884/comments/115000396610 you wrote that you ran it in console. Anyway, IDEA doesn't kill child processes started from it (unless you stop the process explicitly) - even when it crashes itself, ghost processes are kept running

0
Comment actions Permalink

I run my application from console, as npm start and npm build:watch and every works.
But when I tried to debbug from intellij the destinacion folder vanished after going through some breakepoints.

And the webpack doesn't rebuild so it must be IDE.

And when I make some file change webpack:build watch watch files and recreate dist folder but when I once agin debbug and go throught some breakpoints the folder vanish again.

Or maybe IntellIJ chrome plugin for debbuging is the case.

My debbuging options :

0
Comment actions Permalink

>But when I tried to debbug from intellij the destinacion folder vanished after going through some breakepoints.

>And the webpack doesn't rebuild so it must be IDE.

I doubt it.

Can you recreate the issue with https://github.com/srn/react-webpack-boilerplate? If yes, please provide exact steps

0
Comment actions Permalink

When I run webpack (in watch mode - webpack should automaticaly recreate destination folder with all necessary bundles when the change on some file occurs) even from console not attached to IntellIJ and run application in debug mode (from IntellIJ) the destination folder sometimes vanish and when it happends webpack:watch mode doesn't run, does't recreate files so there isn't possibility to delete destination folder by webpack. It has to be IntelliJ or chrome extension.

But when I delete this extension : https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji?hl=en everything works correctly but I can't debbug from console.

 

Please check if the extension can do that type of things.

P.S. Unfortunatelly I cant recreate issue with boilerplate bcs I don't have enought time :(

0
Comment actions Permalink

Extension unlikely has any relation to the issue.

From your description it seems that webpack hot reload crashes if you change your application during debugging. I believe that this has to be reported to webpack developers, can't see how IDEA can be blamed for this

0
Comment actions Permalink

But when I debbug from chrome console everything goes well.

And when I start to debugg from IDE somehow the webpack destination folder vanished.

0
Comment actions Permalink

nobody has ever reported such issues, so it must be specific to your setup. Please provide a test project plus steps I can use to recreate the issue

0
Comment actions Permalink

I will check if Visual Studio Code hasn't this problem.

Thanks for replies.

But I don't have so much energy and time to resolve this problem for you.

0

Please sign in to leave a comment.