I am using react-facebook-login library and TypeScript in my web app. I have also installed @types/react-facebook-login. When I import library like that, everything works fine:
import ReactFacebookLogin from 'react-facebook-login'
However, this library allow import component without any styles (that's what I want):
import ReactFacebookLogin from 'react-facebook-login/dist/facebook-login-render-props'
In this case error appears:
Could not find a declaration file for module 'react-facebook-login/dist/facebook-login-render-props'
My tsconfig.json is created with create-react-app app --template typescript:
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
"include": [
"src"
]
}
Is there any way to fix it?