package.jsonを更新した後、以下のエラーが表示されます。私はそれがnode_modulesフォルダからのものだと確信しています。私は、アプリケーションを実行する前に、うまく動作しますが、webpack:コンパイルに失敗します。この問題を解決するにはどうすればよいですか? [デフォルト] /ユーザ/デスクトップ/ Project/directory/node_modules/@types/jasmine/index.d.tsで角2を更新した後のエラー
ERROR:39:45 は名 'keyof' を見つけることができません。
[デフォルト]/Users/Desktop/Project/directory/node_modules/@types/jasmine/index.d.ts:39:51 '='が必要です。
エラー[デフォルト] /Users/Desktop/directory/node_modules/@types/lodash/index.d.ts:244:12 重複する識別子 '_'。
[デフォルト] /ユーザー/デスクトップ/プロジェクト/ディレクトリ/ node_modules /@types/lodash/index.d.ts:244:15 名前空間 '_'が見つかりません。
ERRORで[デフォルト] /ユーザ/デスクトップ/ Project/directory/node_modules/@types/lodash/index.d.ts:246:24 は、 '部分的な' 名前を見つけることができません。
[デフォルト] /ユーザー/デスクトップ/プロジェクト/ディレクトリ/ nod_modules /@types/lodash/index.d.ts:248:18 重複する識別子 '_'です。
//new error
GET http://localhost:4200/node_modules/zone.js/dist/zone.js
localhost/:11 GET http://localhost:4200/node_modules/primeng/resources/themes/omega/theme.css
localhost/:18 GET http://localhost:4200/node_modules/primeng/resources/primeng.min.css
localhost/:24 GET http://localhost:4200/node_modules/core-js/client/shim.min.js
localhost/:26 GET http://localhost:4200/node_modules/reflect-metadata/Reflect.js
localhost/:27 GET http://localhost:4200/systemjs.config.js
(index):11 GET http://localhost:4200/node_modules/primeng/resources/themes/omega/theme.css
(index):18 GET http://localhost:4200/node_modules/primeng/resources/primeng.min.css
(index):21 GET http://localhost:4200/node_modules/primeng/resources/themes/omega/theme.css
(index):24 GET http://localhost:4200/node_modules/core-js/client/shim.min.js
(index):25 GET http://localhost:4200/node_modules/zone.js/dist/zone.js
(index):26 GET http://localhost:4200/node_modules/reflect-metadata/Reflect.js
(index):27 GET http://localhost:4200/systemjs.config.js
新しいpackage.json
{
"name": "directory",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "~2.4.9",
"@angular/compiler": "~2.4.9",
"@angular/core": "~2.4.9",
"@angular/forms": "~2.4.9",
"@angular/http": "~2.4.9",
"@angular/platform-browser": "~2.4.9",
"@angular/platform-browser-dynamic": "~2.4.9",
"@angular/router": "~3.4.9",
"@types/lodash": "^4.14.50",
"angular-2-data-table": "^0.1.2",
"angular2-datatable": "^0.5.2",
"core-js": "^2.4.1",
"lodash": "^4.17.4",
"ng2-date-picker": "^0.2.1",
"ng2-file-upload": "^1.1.2",
"ng2-modal": "0.0.25",
"ng2-pagination": "^2.0.1",
"ng2-table": "^1.3.2",
"primeng": "^2.0.1",
"rxjs": "5.2.0",
"tinymce": "^4.5.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.7"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"@types/node": "^7.0.5",
"angular-cli": "1.0.0-beta.28.3",
"codelyzer": "3.0.0-beta.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.6.0",
"protractor": "5.1.1",
"ts-node": "2.1.0",
"tslint": "4.5.1",
"typescript": "~2.2.1"
}
}
古いpackage.json
{
"name": "directory",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "~2.1.0",
"@angular/compiler": "~2.1.0",
"@angular/core": "~2.1.0",
"@angular/forms": "~2.1.0",
"@angular/http": "~2.1.0",
"@angular/platform-browser": "~2.1.0",
"@angular/platform-browser-dynamic": "~2.1.0",
"@angular/router": "~3.1.0",
"@types/lodash": "^4.14.50",
"angular-2-data-table": "^0.1.2",
"angular2-datatable": "^0.5.2",
"core-js": "^2.4.1",
"lodash": "^4.17.4",
"ng2-date-picker": "^0.2.1",
"ng2-file-upload": "^1.1.2",
"ng2-modal": "0.0.24",
"ng2-pagination": "^2.0.1",
"ng2-table": "^1.3.2",
"primeng": "^1.1.4",
"rxjs": "5.0.0-beta.12",
"tinymce": "^4.5.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"@types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.18",
"codelyzer": "1.0.0-beta.1",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.9",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "~2.0.3"
}
}
//system.config.js
* System configuration for Angular samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
"ng2-modal": "node_modules/ng2-modal",
"ng2-ckeditor": "npm:ng2-ckeditor",
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
'@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
'primeng': 'npm:primeng',
// other libraries
'rxjs': 'npm:rxjs',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
'ng2-pagination': 'npm:ng2-pagination' // add mapping for ng2-pagination
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
"ng2-ckeditor": {
"ng2-modal": {"main": "index.js", "defaultExtension": "js"},
app: {
main: './main.js',
defaultExtension: 'js'
},
},
'ng2-pagination': { //add configuration to load
main: './index.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
}
}
});
})(this);
** typings **フォルダがまだ残っている場合は削除してください。 –
どこに入力フォルダがありますか?これはtypings.d.tsを意味しますか? – Switz
あなたのアプリのメインフォルダに表示されない場合は、入力フォルダがないことを意味します。 –