aws-samples / aws-appsync-iot-core-realtime-dashboard

This sample application demonstrates a React based web dashboard receiving real-time updates from IoT sensors. The solution is built with AWS AppSync, AWS Amplify, Amazon Location Service, and AWS IoT Core technologies.
MIT No Attribution
112 stars 31 forks source link

web compile error #10

Closed nices0325 closed 2 years ago

nices0325 commented 3 years ago

I updated npm version to the latest, then compile error occurs

/Users/jojaehyeong/aws-appsync-iot-core-realtime-dashboard/web/src/components/LineChartWidget/LineChartWidget.tsx TypeScript error in /Users/jojaehyeong/aws-appsync-iot-core-realtime-dashboard/web/src/components/LineChartWidget/LineChartWidget.tsx(7,10): Property 'global' does not exist on type 'Defaults'. TS2339

 5 | import { ChartOptions, defaults } from 'chart.js';
 6 | 

7 | defaults.global.defaultFontColor = '#ffffff'; | ^ 8 | 9 | const useStyles = makeStyles((theme: Theme) => ({ 10 | paper: {

dave-moser commented 2 years ago

try using

npm install --legacy-peer-deps