当前位置:网站首页>Node environment configuration
Node environment configuration
2022-06-30 10:17:00 【Adair_ Xu】
There are two main changes :( Assume node The installation directory is D:\nodejs)
1. Global module download installation directory :
npm config set prefix “D:\nodejs\node_global”
npm config set cache “D:\nodejs\node_cache”
After modification , The downloaded module is automatically installed in D:\nodejs\node_global Under the node_modules In the catalogue
2. Modify environment variables
2.1) In user variables , find path, Delete npm Environment variable value at the end ( There are plenty of them npm/node_modules ending ), add value :D:\nodejs\node_global
2.2) In user variables , newly added NODE_PATH Variable , The value is :D:\nodejs\node_global\node_modules
After modification ,node Can be loaded into the downloaded module
The above two steps , Especially the environment variables NODE_PATH Value , Finally, I want to write node_modules Catalog , otherwise , The corresponding package will not be loaded . You can enter commands npm install -g vue install vue modular , Then type the command node, And then you type in require('vue'), Return module information , Load succeeded , To configure ok; Or write a js Scripts like test.js, Content such as : var vue = require('vue');console.info(vue); And then in cmd perform node test.js, Return module information , Load succeeded , To configure ok
3. Switch the mirror address ( Optional )
download nrm package :npm install -g nrm
Switch the image address to Taobao npm Mirror address :nrm use taobao
边栏推荐
- 文章内容无法复制复制不了
- 机械臂速成小指南(五):末端执行器
- 开源了!文心大模型ERNIE-Tiny轻量化技术,又准又快,效果全开
- 2022 Season 6 perfect children's model toxon division finals came to a successful conclusion
- NFS shared services
- SolidWorks质量特性详解(惯性张量、转动惯量、惯性主轴)
- How can we have high performance and simple agility in the enterprise cloud on oracle?
- About the split and join operations of strings
- 【JVM】G1垃圾回收器簡述
- Quick completion guide for manipulator (4): reducer of key components of manipulator
猜你喜欢

How to build an all-in-one database cloud machine that meets the needs of information innovation?

MIT-6874-Deep Learning in the Life Sciences Week6

Deployment of efficient and versatile clusters lvs+kept highly available clusters

采坑:Didn‘t receive robot state (joint angles) with recent timestamp within 1 seconds.

二极管如何工作?
![[JVM] brief introduction to CMS](/img/4e/df4a193eed39438f808059f67f19a1.png)
[JVM] brief introduction to CMS
![[JVM] G1 garbage collector](/img/fc/ea1f8cee0f207e4a5c804f88f2871c.png)
[JVM] G1 garbage collector

力扣 428. 序列化和反序列化 N 叉树 DFS

陈颢天 荣获第七届少儿模特明星盛典全国总决赛 全国总冠军

The present situation and challenge of the infrastructure of Yiwen parsing database
随机推荐
How can we have high performance and simple agility in the enterprise cloud on oracle?
二极管如何工作?
“昆明城市咖啡地图”活动再度开启
Cobbler Automated Deployment
After recording 7000 IELTS words in 100 sentences, there are only 1043 words (including simple words such as I and you)
The digital collection of sunanmin's lotus heart clearing was launched on the Great Wall Digital Art
事件流的说明》
Koreano essential creates a professional style
MySQL log management, backup and recovery of databases (1)
The URL copied by the browser and pasted into the document is a hyperlink
背课文记单词,读课文记单词,读文章记单词;40篇文章搞定3500词;71篇文章突破中考单词;15篇文章贯通四级词汇;15篇文章贯通六级词汇
浏览器复制的网址粘贴到文档是超链接
MIT-6874-Deep Learning in the Life Sciences Week5
South China Industrial Group launched digital economy and successfully held the city chain technology conference
机器人系统动力学——惯性参数
2022第六季完美童模 合肥赛区 初赛圆满落幕
关于字符串的split和join操作
Appium automation test foundation - 12 Introduction to appium automated testing framework
Force buckle 428 Serialize and deserialize n-tree DFS
基于强化学习的股票量化交易Automated-Stock-Trading-Ensemble-Strategy