andfanilo / streamlit-drawable-canvas

Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
https://drawable-canvas.streamlit.app/
MIT License
541 stars 83 forks source link

Set the TypeScript version as ^4.6.3 #118

Closed whitphx closed 1 year ago

whitphx commented 1 year ago

When I ran npm start or npm run build, the following error occurred:

> drawable_canvas@0.10.0 build
> react-scripts build

Creating an optimized production build...
Failed to compile.

/path/to/streamlit-drawable-canvas/streamlit_drawable_canvas/frontend/node_modules/@types/babel__traverse/index.d.ts
TypeScript error in /path/to/streamlit-drawable-canvas/streamlit_drawable_canvas/frontend/node_modules/@types/babel__traverse/index.d.ts(68,50):
']' expected.  TS1005

    66 | }
    67 |
  > 68 | export type ArrayKeys<T> = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
       |                                                  ^
    69 |
    70 | export class Scope {
    71 |     constructor(path: NodePath, parentScope?: Scope);

Then I updated the TypeScript version following https://stackoverflow.com/a/69746937/13103190