Skip to content

Error TS2688: Cannot find type definition file for 'jasmine/v2'. #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rwojewoda opened this issue Sep 28, 2019 · 0 comments
Closed

Error TS2688: Cannot find type definition file for 'jasmine/v2'. #249

rwojewoda opened this issue Sep 28, 2019 · 0 comments
Assignees
Labels

Comments

@rwojewoda
Copy link

I was unable to run fresh project on Android. I was getting below error during compilation:
ERROR in node_modules/@types/jasminewd2/index.d.ts(8,23): error TS2688: Cannot find type definition file for 'jasmine/v2'.

Reproduction steps:
create fresh app : ng new --collection=@nativescript/schematics my-shared-app --shared
run app on android: tns run android --bundle

I'm able to run after i deleted all references to jasmine in the project.

@endarova endarova added the bug label Sep 30, 2019
Fatme added a commit that referenced this issue Sep 30, 2019
`Cannot find type definition file for 'jasmine/v2'` error is thrown when a new code shared application is created. It seems the issues comes [from this commit inside jasmine repo](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38412/files#diff-704f3d6b17350ee2426b25280154df4f).  Adding `skipLibCheck: true` to `tsconfig.json`  will skip the checks of `.d.ts` files inside `node_modules`. This will also improve the performance of typescript compilation with a lot of deps and files to process.

Rel to: #249
@Fatme Fatme self-assigned this Sep 30, 2019
Fatme added a commit that referenced this issue Oct 1, 2019
Currently when there is a web application and `ng add @nativescript/schematics` command is executed, the following error is thrown `ERROR in node_modules/@types/jasminewd2/index.d.ts(8,23): error TS2688: Cannot find type definition file for 'jasmine/v2'.`. Adding `skipLibCheck: true` will ensure that typescript will ignore `.d.ts` files from `node_modules`. As it requires too much efforts to add the option in `tsconfig.json`, we decided to add it inside `tsconfig.tns.json`.
As the option is added to `tsconfig.tns.json` file, there will be a difference compared to the behavior of `ng generate --collection=@nativescript/schematics [--shared]`:
* `ng generate --collection=@nativescript/schematics [--shared]` -> `skipLibCheck: true` is inside `tsconfig.json`
* `ng add @nativescript/schematics` -> `skipLibCheck: true` is inside `tsconfig.tns.json`

Rel to: #249
@endarova endarova closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants