- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我关注了this article设置 TypeScript NPM 包。我第一次运行 npm run build
(在安装 jest 之前)。一切顺利。之后,我安装了 jest
,然后再次运行 npm run build
,我在下面收到一条错误消息:
tsc node_modules/@types/babel__template/index.d.ts:16:28 — error TS2583: Cannot find name ‘Set’. Do you need to change your target library? Try changing the
lib
compiler option to es2015 or later.16 placeholderWhitelist?: Set;
Found 1 error.
我的node、npm、tsc版本是:node -v//v8.12.0, npm -v//v6.4.1, tsc -v//v3.4.5
这里是tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"outDir": "./lib",
"strict": false
},
"include": ["./src"],
"exclude": ["node_modules", "**/__tests__/*"]
}
我已经在 tsconfig.json
中排除了“node_modules”,为什么 tsc 仍然运行 node_modules?
最佳答案
就我而言,无论如何我都没有更改项目(在 GIT 更改中看到)。刚刚通过 npm 将 nodejs 安装到 Windows 10 中,并且在编译 ASP.NET 应用程序的 Web 项目时弹出此错误消息(与 node_modules 无关!)。唯一对我有用的解决方案是删除和更新包:
关于typescript - node_modules/@types/babel_template/index.d.ts :16:28 - error TS2583: Cannot find name 'Set' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57055076/
我关注了this article设置 TypeScript NPM 包。我第一次运行 npm run build(在安装 jest 之前)。一切顺利。之后,我安装了 jest,然后再次运行 npm r
我是一名优秀的程序员,十分优秀!