I already tried to include a line of typings but that doesnt resolve this issue for me
here is my tsconfig.json file:
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
],
"types": [
"jasmine"
]
}
}
the path to node_modules is correct
I'm using this temporary solution - while I hope that the atom-typescript plugin can solve it better.
Install the types;
npm install @types/jasmine --save-dev
Added this line into my src/app/app.component.spec.ts file;
import '../../node_modules/@types/jasmine';
Didn't need to add it into any other spec files, editing just this one file solves the issue for me.
Another work-around I found, works, but not as good as above for me, so depending on your needs was to edit "package.json", by moving the jasmine reference in the "devDependencies" up to the "dependencies" section;
"@types/jasmine": "^2.5.38"
I encountered the same issue. To fix it, I removed the typeRoots, and just kept the types array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With