Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] compile error #332

Open
ktwbc opened this issue Jan 27, 2024 · 1 comment
Open

[Bug] compile error #332

ktwbc opened this issue Jan 27, 2024 · 1 comment

Comments

@ktwbc
Copy link

ktwbc commented Jan 27, 2024

Version

1.0.2

Reproduction link

https://example.com

Operating System

macos

Device

macbook pro

Browser & Version

webstorm IDE latest

Steps to reproduce

  1. Just trying to run build
    TS2339: Property 'palette' does not exist on type 'Theme | undefined'.
    19 |
    20 | export default styled(Box)(({ theme, ownerState }: { theme?: Theme; ownerState: any }) => {
    > 21 | const { palette, typography, borders, functions } = theme;
    | ^^^^^^^
    22 | const { color } = ownerState;
    23 |
    24 | const { white, gradients } = palette;

What is expected?

should compile

What is actually happening?

breaks on compile


Solution

Additional comments

@ktwbc
Copy link
Author

ktwbc commented Jan 27, 2024

As a test I downloaded a fresh copy of material-dashboard-2-pro-react-v1.0.2, ran pnpm install for the packages on node 18 and then attempted pnpm build and got the error below -- literally nothing but download, install packages and attempt build

Screenshot 2024-01-27 at 11 33 35

Creating an optimized production build...
[BABEL] Note: The code generator has deoptimised the styling of /Users/kris/Downloads/material-dashboard-2-pro-react-v1.0.2 2/src/assets/images/illustrations/pattern-tree.svg as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
Failed to compile.

TS2307: Cannot find module 'prop-types' or its corresponding type declarations.
17 |
18 | // prop-types is a library for typechecking of props

19 | import PropTypes from "prop-types";
| ^^^^^^^^^^^^
20 |
21 | // draft-js
22 | import { EditorState } from "draft-js";

 ELIFECYCLE  Command failed with exit code 1.

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant