- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我在 Visual Studio Code IDE 的 node_modules/@types/core-js/index.d.ts 中有这些错误:
当我运行 npm start
来为应用程序提供服务时,我得到:
node_modules/@types/core-js/index.d.ts(21,14): error TS2300: Duplicate identifier 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(85,5): error TS2687: All declarations of 'name' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(145,5): error TS2403: Subsequent variable declarations must have the same type. Variable '[Symbol.unscopables]' must be of type '{ copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: ...', but here has type 'any'.
node_modules/@types/core-js/index.d.ts(262,5): error TS2687: All declarations of 'flags' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(276,5): error TS2687: All declarations of 'EPSILON' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(311,5): error TS2687: All declarations of 'MAX_SAFE_INTEGER' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(318,5): error TS2687: All declarations of 'MIN_SAFE_INTEGER' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(457,5): error TS2403: Subsequent variable declarations must have the same type. Variable '[Symbol.toStringTag]' must be of type '"Symbol"', but here has type 'string'.
node_modules/@types/core-js/index.d.ts(457,5): error TS2687: All declarations of '[Symbol.toStringTag]' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(464,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(492,5): error TS2687: All declarations of 'hasInstance' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(498,5): error TS2687: All declarations of 'isConcatSpreadable' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(504,5): error TS2687: All declarations of 'iterator' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(510,5): error TS2687: All declarations of 'match' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(516,5): error TS2687: All declarations of 'replace' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(522,5): error TS2687: All declarations of 'search' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(528,5): error TS2687: All declarations of 'species' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(534,5): error TS2687: All declarations of 'split' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(540,5): error TS2687: All declarations of 'toPrimitive' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(546,5): error TS2687: All declarations of 'toStringTag' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(552,5): error TS2687: All declarations of 'unscopables' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(609,5): error TS2403: Subsequent variable declarations must have the same type. Variable '[Symbol.toStringTag]' must be of type '"Math"', but here has type 'string'.
node_modules/@types/core-js/index.d.ts(609,5): error TS2687: All declarations of '[Symbol.toStringTag]' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(613,5): error TS2403: Subsequent variable declarations must have the same type. Variable '[Symbol.toStringTag]' must be of type '"JSON"', but here has type 'string'.
node_modules/@types/core-js/index.d.ts(613,5): error TS2687: All declarations of '[Symbol.toStringTag]' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(628,5): error TS2687: All declarations of 'size' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(634,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(645,5): error TS2687: All declarations of 'size' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(651,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(666,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(680,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(692,5): error TS2687: All declarations of 'value' must have identical modifiers.
node_modules/@types/core-js/index.d.ts(804,5): error TS2687: All declarations of 'prototype' must have identical modifiers.
node_modules/typescript/lib/lib.es2015.core.d.ts(17,14): error TS2300: Duplicate identifier 'PropertyKey'.
这是我的 tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "system",
"moduleResolution": "node",
"lib": ["es2015", "dom"],
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"outDir":"js/app/",
"typeRoots": [
"./node_modules/@types"
]
},
"exclude": [
"node_modules",
"app/test"
]
}
我的包.json
{
"name": "vepo",
"version": "1.0.0",
"scripts": {
"coverage": "istanbul cover ./test.js",
"lite-server-test": "lite-server --config=liteserver-test-config.json",
"test": "karma start karma.config.js",
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" \"sass --watch app\" \"sass --watch index.scss\" \"sass --watch global-constants.scss\" ",
"lite": "lite-server",
"tsc": "tsc",
"tsc:w": "tsc -w"
},
"bin":{
"e2e-test-start": "bin/e2e-test-start.js"
},
"license": "ISC",
"moduleResolution": "node",
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
"@angular/core": "~2.2.0",
"@angular/forms": "~2.2.0",
"@angular/http": "~2.2.0",
"@angular/platform-browser": "~2.2.0",
"@angular/platform-browser-dynamic": "~2.2.0",
"@angular/router": "~3.2.0",
"@angular/upgrade": "~2.2.0",
"@types/bootstrap": "^3.3.32",
"@types/core-js": "^0.9.34",
"@types/google-maps": "^3.1.28",
"@types/jasmine": "^2.5.38",
"@types/jquery": "^2.0.34",
"@types/node": "^6.0.51",
"angular-in-memory-web-api": "~0.1.15",
"angular2-google-maps": "^0.15.0",
"angular2-modal": "^2.0.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"jquery": "v3.1.1",
"jshint": "^2.9.4",
"ng2-bs3-modal": "^0.10.4",
"ng2-popover": "0.0.9",
"protractor": "4.0.11",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"tslint": "^4.0.2",
"zone.js": "^0.6.25"
},
"devDependencies": {
"@types/google-maps": "^3.1.28",
"angular-mocks": "^1.5.8",
"codelyzer": "1.0.0-beta.0",
"concurrently": "^3.0.0",
"core-js": "^2.4.1",
"del": "latest",
"gulp": "^3.9.1",
"gulp-changed": "^1.3.2",
"gulp-concat": "^2.6.1",
"gulp-imagemin": "^3.1.1",
"gulp-jshint": "^2.0.4",
"gulp-minify-html": "^1.0.6",
"gulp-sass": "latest",
"gulp-sourcemaps": "latest",
"gulp-strip-debug": "^1.1.0",
"gulp-tslint": "latest",
"gulp-typescript": "latest",
"gulp-uglify": "^2.0.0",
"istanbul": "^0.4.5",
"jasmine": "~2.4.1",
"karma": "latest",
"karma-chrome-launcher": "latest",
"karma-cli": "^1.0.1",
"karma-coverage": "latest",
"karma-htmlfile-reporter": "^0.3.4",
"karma-jasmine": "latest",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-mocha-reporter": "latest",
"karma-phantomjs2-launcher": "latest",
"karma-story-reporter": "latest",
"lite-server": "latest",
"path": "latest",
"phantomjs2": "latest",
"protractor-jasmine2-html-reporter": "0.0.6",
"require-dir": "latest",
"systemjs-builder": "latest",
"tslint": "latest",
"typescript": "latest"
}
}
我该如何解决?
**编辑:我曾经对.d.ts
文件使用typings
,但我转向了@types
。我还更新了我的 npm 和节点以尝试解决此问题:
{ app: '1.0.0',
npm: '3.10.8',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '57.1',
modules: '48',
node: '5.something',
openssl: '1.0.2j',
uv: '1.9.1',
v8: '5.1.281.84',
zlib: '1.2.8' }
为此:
{ app: '1.0.0',
npm: '4.0.2',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '57.1',
modules: '48',
node: '6.9.1',
openssl: '1.0.2j',
uv: '1.9.1',
v8: '5.1.281.84',
zlib: '1.2.8' }
npm-调试日志:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@4.0.2
3 info using node@v6.9.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle vepo@1.0.0~prestart: vepo@1.0.0
6 silly lifecycle vepo@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle vepo@1.0.0~start: vepo@1.0.0
8 verbose lifecycle vepo@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle vepo@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/Ben/Development/vepo/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle vepo@1.0.0~start: CWD: /Users/Ben/Development/vepo
11 silly lifecycle vepo@1.0.0~start: Args: [ '-c',
11 silly lifecycle 'tsc && concurrently "npm run tsc:w" "npm run lite" "sass --watch app" "sass --watch index.scss" "sass --watch global-constants.scss" ' ]
12 silly lifecycle vepo@1.0.0~start: Returned: code: 2 signal: null
13 info lifecycle vepo@1.0.0~start: Failed to exec start script
14 verbose stack Error: vepo@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" "sass --watch app" "sass --watch index.scss" "sass --watch global-constants.scss" `
14 verbose stack Exit status 2
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid vepo@1.0.0
16 verbose cwd /Users/Ben/Development/vepo
17 error Darwin 16.1.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v6.9.1
20 error npm v4.0.2
21 error code ELIFECYCLE
22 error vepo@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" "sass --watch app" "sass --watch index.scss" "sass --watch global-constants.scss" `
22 error Exit status 2
23 error Failed at the vepo@1.0.0 start script 'tsc && concurrently "npm run tsc:w" "npm run lite" "sass --watch app" "sass --watch index.scss" "sass --watch global-constants.scss" '.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the vepo package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error tsc && concurrently "npm run tsc:w" "npm run lite" "sass --watch app" "sass --watch index.scss" "sass --watch global-constants.scss"
23 error You can get information on how to open an issue for this project with:
23 error npm bugs vepo
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls vepo
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
最佳答案
升级 "@types/core-js": "0.9.34"
到版本 0.9.39
为我工作。
关于angular - 错误 TS2300 : Duplicate identifier 'PropertyKey' in node_modules/@types/core-js/index. d.ts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40860147/
我有一个内部表,里面有 108 个条目。从 9 到 9 个条目重复条目,我想删除这些重复项。由于它们完全相同,我使用了 delete adjacent duplicates from itab com
在 Team Foundation Server (TFS) 中链接两个工作项 (WI) 时,在什么情况下将“Duplicate”和“Duplicate Of”区分为“链接类型”是有意义的? 如何处理
ld: duplicate symbol _velocityX in \ /Users/Student/Library/Developer/Xcode/DerivedData/finalproject
我使用 PHP 和 Mysql。 此 SQL 有效: INSERT INTO products (id, title, description) VALUES (10, 'va
我有一个大数据框 (120000x40),我尝试在每一行中找到重复项并显示它们。这就是我的尝试: 创建数据框 import pandas as pd df = pd.DataFrame({'col1'
我是 mySQL 和 PHP 的新手,请多多包涵。 如果我的查询有重复字段,我该如何做到这一点,检索到的数据将具有重复查询字段的重复数据。 一个例子是这样的: 查询 id = 34, 54, 21,
我一直遇到这个错误,但我无法理解它,因为它提示一个值恰好出现一次。 Exception in thread "main" java.lang.IllegalStateException: Duplic
我有一个带有 Vuejs 和 Laravel 的 Web 应用程序 我想使用 CKEditor 5 我安装了依赖项 npm install --save @ckeditor/ckeditor5-vue
我有一个包含以下数据的 csv 文件: Id,Name,Type,date 1,name1,employee,25/04/2017 2,name2,contrator,26/04/2017 3,nam
import CKEditor from '@ckeditor/ckeditor5-react'; import ClassicEditor from '@ckeditor/ckeditor5-bui
表定义: CREATE TABLE PositionalDataNGS ( Date DATE, Time TIME(3) , X FLOAT(5), Y FLOAT(5), D FLOAT(5) ,
我目前正在做一个项目,我要处理数以千计的数据包。现在,我记录每个数据包的 IP 和 MAC 地址以及一些其他信息。为了存储所有这些,我使用 MySQL 并且我的脚本是用 Node.js 编写的。目前我
I am using MySQL 5.1.56, MyISAM. My table looks like this:我使用的是MySQL 5.1.56,MyISAM。我的桌子是这样的: CR
我是新来的,对 SQL 比较陌生。我有一个类似这样的表: [Pk], [Case_No], [Status], [Open_Date], [Close_Date], [Case_Age], [Repo
为什么会收到此警告? warning No duplicate props allowed react/jsx-no-duplicate-props# 它显示的是第28行,但没有使用 Prop 。 最
是否有任何函数或方法可以在 python 2.7 中递归实现此目的? Input : ['and', ['or', 'P', '-R', 'P'], ['or', '-Q', '-R', 'P']]
我正在分析 hadoop 中的数据。有一些重复条目,其中 A、B 列重复,而 C 列不同。我想要做的是仅识别 A、B 重复项,然后为每个重复项打印出 C 列的不同值。 示例数据: row, data
您好,感谢阅读并可能对我有所帮助 我的问题的简要说明: 我正在将数据从一个 Firebird 数据库复制到另一个(称为 V14),并且我正在使用 IBExpert 来执行此操作。这些表的名称相同并且具
我想制作一张很像下面的图片: 我想使用 seaborn 使图表看起来漂亮,并让我自己以后更容易使用 facetgrids(我有十个不同的数据集,我想在同一个图表中显示。) 我在 seaborn 中找到
我在两列“user_id”和“project_id”上有一个复合唯一键。 当我尝试对单行或多行运行 DELETE 查询时,出现错误。 ERROR 1062: 1062: Duplicate entry
我是一名优秀的程序员,十分优秀!