Closed deanmraz closed 4 years ago
We have the same problem with ember@3.16 and sometimes get the following error (only in production build):
...
Merge error: conflicting capitalizations:
moment/locale/en-SG.js in /tmp/broccoli-14632r7VYmVxi9CXp/out-118-broccoli_persistent_filter_mapper
moment/locale/en-sg.js in /tmp/broccoli-14632r7VYmVxi9CXp/out-118-broccoli_persistent_filter_mapper
Remove one of the files and re-add it with matching capitalization.
...
The problem seems to be moment
itself. Since moment@^2.25.0
the file en-SG.js
was renamed to en-sg.js
.
@deanmraz I confirm the error with moment@^2.25.0.
Just specify "moment": "2.24.0"
for submodules.
instruction for yarn, instruction for npm
@dmaok How would you implement that? It looks like npm pulled both versions of moment 2.24.0
& 2.25.0
.
@deanmraz, it is easier with yarn. In your package.json add block
"resolutions": {
"moment": "2.24.0"
}
and then yarn install
@dmaok that worked, thank you!
This is a good short term fix, but what is the ideal solution? Does this need to be fixed in this repo or the actual moment repo?
According to https://github.com/terser/terser/issues/684 this is a moment issue though there isn't a specific ticket there yet https://github.com/moment/moment/issues
Fixed in ember-cli-moment-shim@3.8.0 - thanks to @jrjohnson
@jasonmit confirmed! thanks everyone for the help
Issue
Cannot create production builds. Fails during uglify.
Steps
npm i -g ember-cli && ember new ember-moment-test
cd ember-moment-test && ember install ember-moment
ember build --environment=production
Error