Npm run build with outputDir: "/." broke whole system

I need your advice to find out what could have happened, since it seems like my system is totally damaged after running npm run build with vue-cli setup.

Here is what I did:

1: Installed the latest stable version of vue-cli via npm -g on my machine Windows 10.

2: Created a new project with vue create inside a php project.

3: Played arround with vue.config.js. I set outputDir to “/.” which I think was a mistake.

4: run npm build. the shell froze. I killed it with ctrl-c after maybe a minute. in that time many files have been deleted.

result: my work computer is unusable. I cannot connect to my vpn. many applications have been deleted.

the terminal (Cmder which is deleted now as well) was running in elevated privilges mode.

Can someone tell wtf just happened please? I have to ask for restore my machine tomorrow and need to have a little idea at least.


I’m not very familiar with Windows anymore, but part of what happens when you build is the output directory is deleted and recreated to ensure you have a fresh build.

I can’t say for sure, but it sounds like by setting it to /. (i.e. root dir of your drive) and having open permissions across your system it’s managed to delete some important files before the terminal crashed (as you said, it deleted itself so that would explain why it froze).

Really tough lesson to learn, but this is exactly one of the reasons why we box permission access.