I have integrated Mapbox GL JS (Version: 1.8.0) in a React (Version: 16.12.0) and it is working fine. But when I am trying run the build command it throws me the below error:
./node_modules/mapbox-gl/dist/mapbox-gl.css
Module build failed: TypeError: Cannot read property 'toFixed' of undefined
at Array.filter (<anonymous>)
at Array.filter (<anonymous>)
at Array.filter (<anonymous>)
at Array.forEach (<anonymous>)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: react-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] staging: env-cmd .env.staging npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] staging script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Can anybody tell me why react build command throwing the error whereas npm start command not?