-
Notifications
You must be signed in to change notification settings - Fork 375
Closed
Description
Hello,
I'm trying to develop an app with patternfly-react + typescript, using typescript-react-starter. As soon as I add a Button with the first Hello component, I get the following error while building it:
/home/tasato/projects/my-app/node_modules/@patternfly/react-core/dist/js/styles/gutters.d.ts
(1,53): Could not find a declaration file for module '@patternfly/react-styles'. '/home/tasato/projects/my-app/node_modules/@patternfly/react-styles/dist/js/index.js' implicitly has an 'any' type.
Try `npm install @types/patternfly__react-styles` if it exists or add a new declaration (.d.ts) file containing `declare module '@patternfly/react-styles';`
Any ideas why it happens and how I can resolve it?
Here is my Hello.tsx:
import { Button } from '@patternfly/react-core';
import * as React from 'react';
import './Hello.css';
export interface IProps {
name: string;
}
class Hello extends React.Component<IProps, object> {
public render() {
const { name } = this.props;
return (
<div className="hello">
<div className="greeting">
Hello {name}!
</div>
<Button variant="primary">Button</Button>
</div>
);
}
}
export default Hello;danielefiungo and ge0ffrey