TS2503
Cannot find namespace 'React'.
Broken Code ❌
export type CompositeComponent<P> = React.ComponentClass<P>;Fixed Code ✔️
You have to add an import statement when reusing a different namespace. Also make sure to install type declarations (i.e. @types/react) if needed.
import React from 'react';
export type CompositeComponent<P> = React.ComponentClass<P>;Cannot find name 'process'. Do you need to install type definitions for node? Try
npm i --save-dev @types/node.
Solution
Run yarn add --dev @types/node in your npm project.
