我是靠谱客的博主 畅快时光,这篇文章主要介绍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:UsersAdministratorDownloadsnode-v10.16.3-x64.msi

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

npm config set prefix “D:nodejsnode_global”
npm config set cache “D:nodejsnode_cache”

设置环境变量

NODE_PATH
D:nodejsnode_globalnode_modules

参考:

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

最后

以上就是畅快时光最近收集整理的关于Nodejs安装报错(windows)的全部内容,更多相关Nodejs安装报错(windows)内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(110)

评论列表共有 0 条评论

立即
投稿
返回
顶部