Skip to main content


npm ci

Instead of rm -rf node_modules + npm install, you can use npm ci to cleanly install the dependencies in your package-lock.json. It requires a package-lock.json to already exist and will automatically delete the node_modules folder if it’s present.

See npm ci | npm Docs for more details.

Scripts: passing arguments

You can pass arguments to scripts in your package.json file using the -- separator. For example, if you have a script called build that runs tsc and you want to pass the --watch flag to tsc, you can run npm run build -- --watch.

Creating an npm library