aws-samples / amazon-timestream-simple-visualizer

Timestream Simple Visualizer is a web application that allows you to visualize data from a Amazon Timestream database
Apache License 2.0
24 stars 8 forks source link

"npm run build" failed - TypeError: Ajv is not a constructor #19

Closed sethusrinivasan closed 2 years ago

sethusrinivasan commented 2 years ago

Followed instruction to build project and got error

https://github.com/aws-samples/amazon-timestream-simple-visualizer/blob/main/README.md

C:\github\amazon-timestream-simple-visualizer>node --version
v16.13.1

C:\github\amazon-timestream-simple-visualizer>npm run build

> amazon-timestream-simple-visualizer@0.1.0 build
> react-app-rewired build

C:\github\amazon-timestream-simple-visualizer\node_modules\mini-css-extract-plugin\node_modules\schema-utils\dist\validate.js:66
const ajv = new Ajv({
            ^

TypeError: Ajv is not a constructor
    at Object.<anonymous> (C:\github\amazon-timestream-simple-visualizer\node_modules\mini-css-extract-plugin\node_modules\schema-utils\dist\validate.js:66:13)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\github\amazon-timestream-simple-visualizer\node_modules\mini-css-extract-plugin\node_modules\schema-utils\dist\index.js:6:5)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
mirgj commented 2 years ago

thanks @sethusrinivasan for this, I'm not able to reproduce this issue I've tried to build with v16.13.1 and v14.19.0 but both works on my side. Are you able to run it in debug (npm start)?

mirgj commented 2 years ago

closing this. Open a new issue in case of outstanding problems