Describe the bug
I get this error on chrome console after I build the production optimized build
Uncaught Error: Cannot find module './locale'
at 2.d0944550.chunk.js:1
at Module. (2.d0944550.chunk.js:1)
at f ((index):1)
at Module.837 (main.091f08fc.chunk.js:1)
at f ((index):1)
at Object.540 (main.091f08fc.chunk.js:1)
at f ((index):1)
at a ((index):1)
at Array.e [as push] ((index):1)
at main.091f08fc.chunk.js:1
This is my package.json
{
"name": "sheetgo-front-end",
"version": "0.1.0",
"private": true,
"dependencies": {
"@allpro/react-router-pause": "^1.1.3",
"@material-ui/core": "^4.4.2",
"@material-ui/icons": "^4.5.1",
"@material-ui/lab": "^4.0.0-alpha.26",
"@material-ui/styles": "^4.4.1",
"@material/icon-button": "^3.1.0",
"@material/react-button": "^0.15.0",
"@material/react-card": "^0.15.0",
"@material/react-icon-button": "^0.15.0",
"@material/react-material-icon": "^0.15.0",
"@material/react-select": "^0.15.0",
"@material/react-tab": "^0.15.0",
"@mdi/js": "^3.4.93",
"@mdi/react": "^1.1.0",
"@stripe/react-stripe-js": "^1.1.0",
"@stripe/stripe-js": "^1.2.0",
"@svgr/webpack": "^4.1.0",
"apexcharts": "^3.8.6",
"axios": "^0.19.2",
"browser-info": "^1.2.0",
"chart.js": "^2.7.2",
"classnames": "^2.2.6",
"color-sort": "^0.0.1",
"connected-react-router": "^6.5.2",
"countup.js": "^1.9.3",
"cra-append-sw": "^2.7.0",
"filepond": "4.1.0",
"filepond-plugin-file-validate-size": "2.1.1",
"filepond-plugin-file-validate-type": "1.2.2",
"form-serialize": "^0.7.2",
"fuse.js": "^3.4.2",
"history": "^4.10.1",
"inputmask": "^4.0.0",
"is-mobile": "^2.0.0",
"jquery": "^3.3.1",
"jquery-ui-sortable-npm": "^1.0.0",
"js-cookie": "^2.2.0",
"lodash": "^4.17.10",
"markdown-to-jsx": "^6.10.3",
"material-components-web": "^3.1.0",
"material-ui-chip-input": "^1.0.0",
"md5": "^2.2.1",
"memoize-one": "^5.0.4",
"moment": "^2.22.2",
"moment-timezone": "^0.5.27",
"onecolor": "^3.1.0",
"p-queue": "^6.1.1",
"payform": "^1.2.2",
"promise-throttle": "^1.0.0",
"prop-types": "^15.7.0",
"query-string": "^6.5.0",
"react": "^16.8.1",
"react-apexcharts": "^1.3.3",
"react-dom": "^16.8.1",
"react-draggable": "4.2.0",
"react-filepond": "7.0.1",
"react-google-authorize": "^1.0.4",
"react-hotjar": "^2.0.0",
"react-id-swiper": "^1.6.8",
"react-intl": "^2.5.0",
"react-modal-video": "^1.2.3",
"react-redux": "^7.1.1",
"react-resizable": "^1.8.0",
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"react-router-last-location": "^2.0.1",
"react-scripts": "^2.1.4",
"react-sizeme": "^2.5.2",
"react-stripe-elements": "^4.0.0",
"react-text-mask": "^5.4.3",
"react-virtualized-auto-sizer": "^1.0.2",
"react-vis-network": "^1.0.0",
"react-window": "^1.8.1",
"recompose": "^0.30.0",
"redux": "^4.0.4",
"redux-react-session": "^2.4.0",
"redux-saga": "^1.1.1",
"redux-thunk": "^2.3.0",
"socket.io-client": "^2.3.0",
"sort-by": "^1.2.0",
"tether": "^1.4.4",
"throttle-debounce": "^2.1.0",
"url-loader": "^1.0.1"
}
If I build locally with yarn for the dev version it works
To Reproduce
Steps to reproduce the behavior:
Build an app with those requirements. Should get that error on console.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Moment-specific environment
- The time zone setting of the machine the code is running on
- The time and date at which the code was run
- Other libraries in use (TypeScript, Immutable.js, etc)
Please run the following code in your environment and include the output:
console.log((new Date()).toString())
console.log((new Date()).toLocaleString())
console.log((new Date()).getTimezoneOffset())
console.log(navigator.userAgent)
console.log(moment.version)
Additional context
Add any other context about the problem here.