I use nodejs 14.18.1 locally and in the pipeline, a few days ago a part of the frontend started to fall off with the error "ReferenceError: Cannot access 'z' before initialization", there are no errors in the code, also the local build works, and we even uploaded it on s3 as a temporary solution, but after building via bitbucket, an error appears.
script:
- cd client
- npm install
# CI=true in default variables for Bitbucket Pipelines https://support.atlassian.com/bitbucket-cloud/docs/variables-in-pipelines/
- npm run build:br
npm run build below
"build:br": "webpack --env REACT_APP_LANGUAGE_TYPE=BRAZIL --mode production",