惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
F
Fortinet All Blogs
B
Blog
GbyAI
GbyAI
P
Proofpoint News Feed
量子位
The Register - Security
The Register - Security
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
B
Blog RSS Feed
WordPress大学
WordPress大学
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
O
OpenAI News
月光博客
月光博客
H
Hacker News: Front Page
S
Security Affairs
W
WeLiveSecurity
The Hacker News
The Hacker News
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
T
The Blog of Author Tim Ferriss
Spread Privacy
Spread Privacy
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
S
Securelist
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
A
About on SuperTechFans

博客园 - Insus.NET

User Profile Service 服务未能登录 Visual Studio2026创建Vue项目 HTTP Error 403.14 - Forbidden VisualStudio2026回滚上一版本 消息认证码(加强) 网站无法使用插值字符串语法 HMAC(Hash-based Message Authentication Code)认证示例 浏览器自动发送域凭据 企业内小网站兼用Windows验证登录 访问用户控件的函数 onblur事件改为监听处理 将警报消息改为吐司消息 内容有无变化OnBlur即时更新引起的问题与解决 混合式提高用户编辑与操作效率 光标离开文框后即刻更新 WebForm实现Web API JavaScript对GridView删除行后并重新给其数据绑定 把CS值传给JS使用 v2 确认信息confirm由C#后端移至javascript前端 无法发布网站Web Site JavaScript判断字符是否为decimal 点击单元格弹出窗口处理数据返回父页 GridView数据控件中实现单选功能 文本框输入完后直接按回车提交数据 GridView对行进行全选或单选 TextBox文本框允许用户输入正或负小数 用户单击文本并复制至剪帖板 Vue3格式化日期时间与插值 SQL Server中验证大小字母和数字 MS SQL Server 数据加密与解密实例 相册由原来Lightbox升级至Vue2瀑布流 从Visual Studio 2022升级至Visual Studio 2026 报表应用图表charts显示数据 钉钉(DingTalk)免登录 Upgrade Outlook Connector 程序中真实应用SignalR Web API路径与IIS站点应用程序名或虚拟目录 在您可以登录前,此副本的 Windows 必须被 Microsoft 激活。您想现在激活它吗 电脑系统由Win10降级Win7折腾还是折腾 System.ComponentModel.Win32Exception: Access is denied
安装与配置node.js
Insus.NET · 2026-06-30 · via 博客园 - Insus.NET

参考下面,
npm(随 Node.js 一起提供,https://www.npmjs.com/https://www.npmjs.com/package/npm

npm - a JavaScript package manager

npm comes bundled with node, & most third-party distributions, by default. Officially supported downloads/distributions can be found at: nodejs.org/en/download

You can download & install npm directly from npmjs.com  https://npmjs.com using our custom install.sh script:

curl -qL https://www.npmjs.com/install.sh | sh


2026-06-30_11-11-34

2026-06-30_11-14-47


Insus.NET电脑是Windows 10 64bit。
2026-06-30_11-18-08

经验告之,不想按默认路径进行安装,那在除C盘外,如D盘创建一个目录,如nodejs。

找到刚下载的node-v24.18.0-x64.msi右键,点“安装”,

2026-06-30_11-31-26

2026-06-30_11-33-22


2026-06-30_11-37-33


第4步,选择预选创建的目录。


2026-06-30_11-40-30

2026-06-30_11-41-48


上截图中,有一个选项,如果选上,会安装Chocolatey,这是第3方的Windows包管理工具。你可以点链接了解。
Insus.NET安装时,并未选。按实际需求时,再安装。

2026-06-30_11-57-27

2026-06-30_13-07-55

2026-06-30_13-08-29

2026-06-30_13-08-40

Verify the Node.js and npm version:
2026-06-30_10-41-11

2026-06-30_13-20-38

接下来,我们做一些配置,npm路径:
打开你的 Node.js 安装目录(D:\nodejs),本随笔一开始时我们有提过,把node.js安装在D盘。
手动创建2个目录 node_global 和 node_cache

2026-06-30_13-40-07配置路径:

npm config set prefix "D:\nodejs\node_global"

npm config set cache "D:\nodejs\node_cache"

2026-06-30_13-47-07

此时,你可以通以下命令来验证配置的路径是否成功,
2026-06-30_13-56-30

蓝色箭头所指的输出结果与我们配置一样说明配置成功。

设置环境变量:
右键点击桌面上的此电脑,选择属性 ,点击高级系统设置,然后选择环境变量

2026-06-30_15-16-49

系统变量区域,点击新建,输入以下内容,然后点击确定
变量名(N):NODE_PATH

变量值(V):D:\nodejs\node_global\node_modules

2026-06-30_15-34-26

编辑用户变量,
2026-06-30_15-49-01

修改结果如下,
2026-06-30_16-06-10

更新系统变量Path,
2026-06-30_16-11-32

完成配置系统变量与用户变量,测试一下,看看配置是否生效,
输入“echo %NODE_PATH%”
输出:D:\nodejs\node_global\node_modules。

2026-06-30_16-21-38

最后,全局安装express,


安装成功后,node_global文件夹下会生成node_modules目录
2026-06-30_16-37-39

验证,
2026-06-30_16-44-38

输出:

D:\nodejs\node_global\node_modules


命令行正常输出:
2026-06-30_17-23-23

 
OK,一切顺利与成功。