@ types/fhirを使用していますが、JITとAOTがfhir
名前空間を参照しているうちに、ng test
を実行していません。これをどのようにデバッグできますか?角度検査でタイプが認識されない
私のtsconfig.json
にはすでに"typeRoots": [ "node_modules/@types" ]
が含まれています。
package.json
:
{
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@types/fhir": "0.0.30",
"bootstrap": "^4.0.0-beta",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"ng2-slim-loading-bar": "^4.0.0",
"ngx-bootstrap": "^2.0.0-beta.4",
"ngx-infinite-scroll": "^0.5.1",
"rxjs": "^5.4.1",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.2.6",
"@angular/compiler-cli": "^4.0.0",
"@angular/language-service": "^4.0.0",
"@types/fhir": "0.0.30",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~8.0.19",
"codelyzer": "~3.1.2",
"jasmine-core": "~2.7.0",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.3.0",
"tslint": "~5.5.0",
"typescript": "~2.4.2"
}
}
karma.conf.js
:
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
あなたのpackage.jsonはAOTとng testのようにどのように見えますか? – Swoox
package.jsonが追加されました! – Vadi
あなたの** karma.conf **を見ても間違いないようですね。** ngテスト用の設定があります。 – Swoox