# npm ## Install ### Install with installer https://nodejs.org/en/download/ ## Notes ### Yes, add package-lock.json to the commit https://stackoverflow.com/questions/44206782/do-i-commit-the-package-lock-json-file-created-by-npm-5#:~:text=12%20Answers&text=Yes%2C%20package%2Dlock.,a%20lockfile%20as%20package%2Dlock. ### Apparently `npm ci` is much preferred to `npm install` https://stackoverflow.com/a/56254478/2513061 Differences: - The project must have an existing package-lock.json or npm-shrinkwrap.json. - If dependencies in the package lock do not match those in package.json, `npm ci` will exit with an error, instead of updating the package lock. - `npm ci` can only install entire projects at a time: individual dependencies cannot be added with this command. - If a `node_modules` is already present, it will be automatically removed before `npm ci` begins its install. - It will never write to `package.json` or any of the package-locks: installs are essentially frozen.