Skip to content

Npm installation error (VueJS/Typescript) #60

Closed
@kangelSL

Description

@kangelSL

Bug:

On a VueJS project, using the npm install command and basic import statement ( import { render, fireEvent, cleanup } from '@testing-library/vue']) raises an error:

  • Could not find a declaration file '@testing-library/vue'

The error recommends installing @types/testing-library__vue. But attempting to install this provides another error message:

  • @types/testing-library__vue@latest is not in the npm registry.

To reproduce:

  • Spin up a vue app with Jest as the default testing provider and use typescript
  • Open a .spec.ts file
  • Run the npm install for vue testing library
  • Add import { render, fireEvent, cleanup } from '@testing-library/vue';
  • IDE picks out import library as an error, npm run test will no longer run successfully
  • Installing the suggested library @types/testing-library__vue --save-dev is unsuccessful

Related information:

  • @testing-library/vue version: ^1.1.0
  • Vue version: ^2.6.10
  • node version: 10.15.3
  • npm version: 6.9.0

Related code/config:

  • Using typescript

Metadata

Metadata

Assignees

No one assigned

    Labels

    has PRThere's an open PR to solve/close the issuehelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions