gpt4 book ai didi

node.js - 运行 vs-mda-remote 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 02:49:45 25 4
gpt4 key购买 nike

我按照 https://msdn.microsoft.com/en-us/library/dn771551.aspx 上的说明进行操作安装 vs-mda-remote。我唯一注意到的是以下内容:

npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.0","npm":"2.5.1"})
npm WARN engine cordova-js@3.7.2: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})

但是据我所知,安装成功完成。但是当我执行 vs-mda-remote 时,出现以下错误:

vs-mda-remote
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
0.2.7

/usr/local/lib/node_modules/vs-mda-remote/lib/cli.js:46
'lang': process.env.LANG.replace(/_.*/,""), // Convert "en_US.UTF8" to
^
TypeError: Cannot read property 'replace' of undefined
at module.exports (/usr/local/lib/node_modules/vs-mda-remote/lib/cli.js:46:33)
at Object.<anonymous> (/usr/local/lib/node_modules/vs-mda-remote/bin/vs-mda-remote:10:5)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

有人遇到过这种情况吗? Mac上安装的NodeJS版本是0.12

最佳答案

user2458203说得对,关键是设置LANG环境变量。如果您不熟悉 Mac 操作系统(就像我一样),这里有一个更详细的版本:

  • 在终端中输入:export LANG=en_US.UTF-8
  • 通过启动node.js CLI(在终端中输入“node”)进行验证,然后输入“process.env”。如果您在输出中看到新的“LANG”变量,那么您就可以开始了,vs-mda-remote 现在应该可以工作了

关于node.js - 运行 vs-mda-remote 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28598504/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com