Node installation and environment variable configuration + nvm node version control management

  • nvm switching node version management tutorial (click here to view)
  • SSH public key configuration tutorial
  • Install the node package => official website address => historical version . It is recommended to install the installation package ending with .msi. Just keep thinking about the next step until the end.
  • Win + r enter cmd to check whether the node version is successfulnode -v
  • Next configure environment variables

    • First create two folders node_cache (cache directory) node_global (global package storage directory) in your own node directory.
      Insert image description here

    • Win + r input . Open the directory and find .npmrc. Open notepad and enter your node_global and node_cache addresses .
      prefix=D:\\software\\nodejs\\node_global
      cache=D:\\software\\nodejs\\node_cache
      Insert image description here
      Insert image description here

    • Then in My Computer->Properties->Advanced Property Configuration->System Properties-Environment Variables there are two user variables and system variables .

    • Add Path under user variablesD:\software\nodejs\node_global
      Insert image description here
      Insert image description here

    • System variables add variable name NODE_PATHand variable valueD:\software\nodejs\node_global\node_modules
      Insert image description here

    • D:\software\nodejsAdd and add Path under system variables%NODE_PATH%
      Insert image description here
      Insert image description here

    • After the editing is completed, everything is confirmed. win + rEnter cmd to open and npm install -g vuethe vue file will appear after the input is successful.
      Insert image description here

Guess you like

Origin blog.csdn.net/l2345432l/article/details/126034982