A clone of the famous language-learning app using NextJs, TypeScript, and PostgrSQL.
This repository is for learning purposes only.
rm -rf node_modules package-lock.jsonrm: Stands for “remove.” It deletes files and directories.-r: Recursively deletes the contents of a directory.-f: Forces deletion without prompting for confirmation.node_modules: This is the folder where all installed dependencies are stored.package-lock.json: This file locks the versions of dependencies to ensure consistency across installations.
This command deletes the entire node_modules folder and the package-lock.json file. This is useful for:
- Clearing out corrupted or outdated dependencies.
- Ensuring a clean slate before reinstalling all packages.
npm install --legacy-peer-depsnpm install: Installs all dependencies listed in package.json.--legacy-peer-deps: Bypasses peer dependency conflicts and installs packages the way older versions of npm did (prior to npm v7).
This is particularly useful when:
- Dependencies have incompatible peer dependencies that cause conflicts.
- You’re using older libraries that aren’t fully compatible with the latest npm version’s strict peer dependency rules.
- This sequence ensures that all dependencies are installed fresh without conflicts.
- It effectively resolves version conflicts that might occur due to strict peer dependencies by falling back to older rules.
coderBri © 2024