问题描述 (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.
解决方法
- cmd(管理员)
- 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/