@types/xxxx
package and had problems.Definitions by:
in index.d.ts
) so they can respond.Hello @tkrotoff @huy-nguyen
I just installed @types/react-router-dom. My project can no longer recongize React and React-dom.
See package.json below.
{
"name": "responder",
"version": "0.1.0",
"private": true,
"dependencies": {
"@types/jest": "^20.0.2",
"@types/node": "^8.0.5",
"@types/react": "^15.0.33",
"@types/react-dom": "^15.5.1",
"@types/react-router-dom": "^4.0.5",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-router-dom": "^4.1.1",
"react-scripts-ts": "2.3.2"
},
"devDependencies": {
"typescript": "^2.4.1"
},
"scripts": {
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject"
}
}
Any idea there?
Thanks
Delete node_modules directory, close your editor, npm install/yarn, wait, reopen your editor
That fixed it although now it cannot find Node modules 'process' or 'require' but they may be because I upgraded TypeScript.
Will log different issue
I just experienced this problem. First make sure your node_modules is present. Incase it is, delete it and run npm i or yarn install. Also make sure your node package manager is on v11.0.0. its recommended for react
Most helpful comment
Delete node_modules directory, close your editor, npm install/yarn, wait, reopen your editor