Skip to content

react-vue use *.vue with typescript #13

@error-500

Description

@error-500

I'm try use simple vue component in simple react application

When i'm use lang="ts"

<script lang="ts">
...

Raise error

Could not find a declaration file for module 'react-vue'. '/home/error500/Projects/frontend-letteros-workarea/node_modules/react-vue/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/react-vue` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-vue';`

Installed by

yarn add react-vue react-vue-helper
yarn add -D  react-vue-loader

package.json depends sections

"dependencies": {
  "react": "^16.14.0",
  "react-dom": "^16.14.0",
  "react-vue": "^0.0.5",
  "react-vue-helper": "^0.0.7"
},
"devDependencies": {
  "@babel/core": "^7.16.5",
  "@types/react": "^16.9.52",
  "@types/styled-components": "^5.0.1",
  "css-loader": "^6.5.1",
  "dotenv": "^10.0.0",
  "dotenv-parse-variables": "^2.0.0",
  "dotenv-webpack": "^7.0.3",
  "react-vue-loader": "^0.1.2",
  "typescript": "3.9.5",
  "webpack": "^4.42.1",
  "webpack-cli": "^4.9.1"
}

node_modules package fs structure

./node_modules/react-vue
├── build.js
├── COMPONENT.md
├── index.js
├── package.json
└── README.md

how can i fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions