Nodejs安装报错(windows)

问题描述 (windows10 安装node.js 报错)

The installer has encountered an unexpected error installing this package.This may indicate a problem with this package.The error code is 2503.

解决方法

  1. cmd(管理员)
  2. msiexec /package C:\Users\Administrator\Downloads\node-v10.16.3-x64.msi

设置全局模块路径和缓存路径

npm config set prefix “D:\nodejs\node_global”
npm config set cache “D:\nodejs\node_cache”

设置环境变量

NODE_PATH
D:\nodejs\node_global\node_modules

参考:

https://www.cnblogs.com/zhouyu2017/p/6485265.html
https://blog.csdn.net/u012145619/article/details/41483149/

发布了36 篇原创文章 · 获赞 3 · 访问量 2913

猜你喜欢

转载自blog.csdn.net/weixin_39836585/article/details/102585899
今日推荐