typescript - 无法使用 npm 在 MacOS 上安装 Typescript
问题描述
我一直在尝试使用以下命令在我的 Mac 上全局安装 Typescript:
npm install -g typescript
并且:
sudo npm install -g typescript
但是每次我尝试检查它是否安装正确时,我都会使用tsc -v得到以下错误:
/usr/local/lib/node_modules/typescript/lib/tsc.js:5970
var textToKeyword = new ts.Map(ts.getEntries(textToKeywordObj));
^
TypeError: Iterator value undefined is not an entry object
at new Map (native)
at ts (/usr/local/lib/node_modules/typescript/lib/tsc.js:5970:25)
at Object.<anonymous> (/usr/local/lib/node_modules/typescript/lib/tsc.js:7892:3)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
任何人都可以提供有关如何解决此问题的任何指导吗?
谢谢你的时间。
解决方案
推荐阅读
- audio - 将 G.723.1 转换为普通 wav 和拆分通道?
- c# - c# Entity Framework 6 on delete cascade one to many
- python - 如何在搜索文本时打印 n 个上下文单词
- vba - 提示用户一次但将结果应用于多条消息的规则?
- python - 如何有效地检查python中的连续范围
- c - 我想将字符串从文件复制到变量 2d char
- c++ - C++ 二维数组表
- wordpress - 在我的 Wordpress 页脚中添加或删除小部件正在我的侧边栏中进行镜像
- node.js - Bitbucket Pipeline npm install 失败并显示“npm ERR!致命:无法访问”
- javascript - 如何在反应原生地图中获取边界