D
D
daima2018-08-28 18:41:50
React
daima, 2018-08-28 18:41:50

Why can't the module be found?

Installed react
in script: import React, { PureComponent, Fragment } from 'react'
react is highlighted with hint:
Could not find module declaration file 'react'. "c:/frontend/node_modules/react/index.js" has an implicit type of "any".
Try "npm install @types/react" if possible, or add a new declaration file (.d.ts) containing "declare module 'react';"

I tried npm install @types/react, it helped, but what is this @types/react?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2018-08-28
@gadfi

I tried npm install @types/react, it helped, but what is this @types/react?
types for ts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question