node/ npm / nodejs

n this mind map, I’ve focused on key technical aspects of Node.js and npm configurations. Here's an outline of the main technical content: Setting Default Registry: Commands to set the npm registry to the default: npm config set registry https://registry.npmjs.org/ Managing .npmrc Files: Details on configuring the .npmrc file globally on different operating systems: Linux/Mac: ~/.npmrc Windows: C:\Users\<YourUsername>\.npmrc Formatting for private repositories and handling authentication t...

Get Started. It's Free
or sign up with your email address
node/ npm / nodejs by Mind Map: node/ npm / nodejs

1. Styles

1.1. bad

1.2. good

1.3. not as good

1.4. not as bad

1.5. important

1.6. warning

2. main

2.1. set to default registery

2.1.1. npm config set registry https://registry.npmjs.org/

2.1.2. npm config set registry https://registry.npmjs.org/

2.2. .npmrc

2.2.1. Global .npmrc: This is typically located in your home directory.

2.2.1.1. On Linux/Mac: ~/.npmrc

2.2.1.2. On Windows: C:\Users\<YourUsername>\.npmrc

2.2.2. format of the file for private repos

2.2.2.1. //<custom_registry_url>/:_authToken=<auth_token>

2.2.2.2. the default is

2.2.2.2.1. registry=https://registry.npmjs.org/

2.2.3. to fix react bug:

2.2.3.1. legacy-peer-deps=true

2.2.4. scoped

2.2.5. npm install --userconfig ./.npmrc

2.3. link

2.3.1. vid

2.3.2. good one

2.3.2.1. 2

2.3.3. to access dependencies locally

2.3.4. doc

2.3.4.1. npm link --workspace <name>

2.3.5. commands

2.3.5.1. npm link

2.3.5.2. npm link package-name

2.3.5.3. npm unlink package-name

2.3.5.4. npm -ls link

2.3.6. Bug

2.3.6.1. I am not sure, But i think it messed up my tsconfig.json

2.3.6.1.1. more photo

2.4. scoped

2.4.1. Scoped npm packages are a way to group related packages together under a common namespace.

2.4.1.1. importing the package

2.4.1.2. 2

2.5. Commands

2.5.1. remove installed packages

2.5.1.1. rm -rf node_modules package-lock.json yarn.lock

2.6. publish to npm

2.6.1. very good video

2.6.1.1. lint to make sure nothing is broken

2.6.1.2. changeset

2.6.1.2.1. help on package versioning documentation

2.7. react issue

2.7.1. --legacy-peer-deps=true

2.8. switching node version for legacy projects developments

2.8.1. issue

2.8.1.1. The error you're encountering is related to TypeScript's moduleResolution option not being properly set for the project. The root cause is likely a mismatch between the required Node.js version, TypeScript configuration, and dependencies in the project.

2.8.1.2. Since you're using Node.js v20.14.0, there might be compatibility issues with this newer version. Many popular repositories are still tested primarily on Node.js v16 or v18.

2.8.2. solution

2.8.2.1. switching between node versions using node manager

2.8.3. Tut

2.8.3.1. link to setup.exe

2.9. NVM

2.9.1. commands

2.9.1.1. nvm install 16

2.9.1.1.1. nvm install 20

2.9.1.2. nvm use 16

2.9.1.3. node -v

2.9.2. My original version was

2.9.2.1. v20.14.0