大佬教程收集整理的这篇文章主要介绍了尝试使用 npm install 时,我在不和谐机器人上收到“未定义 msvsVersion”错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直在尝试自托管一个 TypeScript discord 机器人,但设置过程令人困惑。我认为它应该使用 build
文件创建一个 index.Js
目录,但我不确定。我安装了 Visual studio Build Tools 2017,因为它似乎需要它们,但运行 npm install
会出现以下错误:
> sodium@3.0.2 preinstall C:\Users\fang2\documents\Coding\discord Bots\Myu-Bot-master\node_modules\sodium
> node install.Js --preinstall
MS Version: 2017
C:\Users\fang2\documents\Coding\discord Bots\Myu-Bot-master\node_modules\sodium\install.Js:312
console.log('InvalID msvs_version ' + msvsversion + '\n');
^
ReferenceError: msvsversion is not defined
at errorInvalIDMSVsversion (C:\Users\fang2\documents\Coding\discord Bots\Myu-Bot-master\node_modules\sodium\install.Js:312:43)
at checkMSVsversion (C:\Users\fang2\documents\Coding\discord Bots\Myu-Bot-master\node_modules\sodium\install.Js:329:9)
at Object.<anonymous> (C:\Users\fang2\documents\Coding\discord Bots\Myu-Bot-master\node_modules\sodium\install.Js:353:5)
at Module._compile (node:internal/modules/cJs/loader:1092:14)
at Object.Module._extensions..Js (node:internal/modules/cJs/loader:1121:10)
at Module.load (node:internal/modules/cJs/loader:972:32)
at Function.Module._load (node:internal/modules/cJs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47
npm ERR! code EliFECYCLE
npm ERR! errno 1
npm ERR! sodium@3.0.2 preinstall: `node install.Js --preinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium@3.0.2 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\fang2\ApPDAta\roaR_797_11845@ing\npm-cache\_logs\2021-06-01T04_30_07_597Z-deBUG.log
我尝试了 2019 构建工具和 2017 构建工具,并尝试手动设置 msvs 版本,但似乎没有任何效果。任何帮助将不胜感激。
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的尝试使用 npm install 时,我在不和谐机器人上收到“未定义 msvsVersion”错误全部内容,希望文章能够帮你解决尝试使用 npm install 时,我在不和谐机器人上收到“未定义 msvsVersion”错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。