hf02
hf02

Reputation: 403

Deleting node modules crashes computer

Every recent node project I've made will blue screen my computer when I delete the node_modules folder. I've found when trying to free up space with OneDrive that these files in .bin "cannot be accessed by the system."

Here are the files that are in .bin:

acorn
browserslist
cssesc
envinfo
import-local-fixture
json5
nanoid
node-which
semver
terser
webpack
webpack-cli

They are all 0 bytes.

My dependences:

"devDependencies": {
  "css-loader": "^5.1.1",
  "csv-loader": "^3.0.3",
  "style-loader": "^2.0.0",
  "webpack": "^5.24.3",
  "webpack-cli": "^4.5.0",
  "xml-loader": "^1.2.1"
},
"dependencies": {
  "lodash": "^4.17.21"
}

I've tried DISM.exe /Online /Cleanup-image /Restorehealth, sfc /scannow, and chkdsk /f. I don't think its my computer as I've only had this with node projects, and its always in the .bin folder.

Upvotes: 0

Views: 352

Answers (1)

hf02
hf02

Reputation: 403

It turns out that installing modules with WSL was the issue. Simply running npm i in Powershell fixes this. The empty files get bash scripts put into them, and they also get .ps1 and .cmd files.

Upvotes: 1

Related Questions