From 1595d736f212d1c2a6b7378953de461ae2de2afc Mon Sep 17 00:00:00 2001 From: David Coomber <47242934+dcoomber@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:08:48 +0200 Subject: [PATCH] Added snippet to assist in deleting node_modules / package-lock.json in dir structure --- docs/development.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 91c1b0e5..ec2b5787 100644 --- a/docs/development.md +++ b/docs/development.md @@ -28,6 +28,16 @@ npm run dev:electron You might encounter a `Unsupported platform` error when you run `npm install`. To fix this, you will need to delete `node_modules` and `package-lock.json` and run `npm install`. This should install all the necessary packages needed to run the app. +```shell +# Delete node_modules in sub-directories +find ./ -type d -name "node_modules" -print0 | while read -d $'\0' dir; do + rm -rf "$dir" +done + +# Delete package-lock in sub-directories +find . -type f -name "package-lock.json" -delete +``` + ### Testing ```bash @@ -36,5 +46,4 @@ npm test --workspace=packages/bruno-schema # bruno-lang npm test --workspace=packages/bruno-lang - ```