bobisjan / ember-format

Internationalize ambitious web applications
http://bobisjan.com/ember-format
MIT License
13 stars 2 forks source link

Duplicate declaration "Intl" #34

Open Bouke opened 9 years ago

Bouke commented 9 years ago
$ ember server
version: 0.2.3
Livereload server on port 35729
Serving on http://localhost:4200/
File: exon/utils/intl.js
exon/utils/intl.js: Line 3: Duplicate declaration "Intl"
TypeError: exon/utils/intl.js: Line 3: Duplicate declaration "Intl"
  1 | import Intl from 'npm:intl';
  2 | 
> 3 | var Intl = window.Intl || Intl;
    |     ^
  4 | 
  5 | export default Intl;
  6 | 

When I changed intl.js into:

import NpmIntl from 'npm:intl';

var Intl = window.Intl || NpmIntl;

export default Intl;

...the server loads, but the following error is shown in the console:

Uncaught Error: Could not find module npm:intl-format-cache imported from exon/formatters/date

bobisjan commented 9 years ago

Thanks for pointing this out. I have to update ember-cli with underlying libs and then I'll see what has changed.

bobisjan commented 9 years ago

I've just released a new version with fixed duplication error, so you can give a try.

timbaas commented 9 years ago

Doesn't seem to work for me, I don't see the duplicate declaration error though, only the error in console: Uncaught Error: Could not find module npm:intl-format-cache imported from app/formatters/date I'm using version 0.0.5 on Ember CLI 0.2.5

j-mcnally commented 9 years ago

Also getting this with 0.2.7 :(

jeremytm commented 9 years ago

:+1:

gannetson commented 9 years ago

Manually installing dependencies and ember-browserify does the trick for me:

npm install --save-dev ember-browserify
npm install --save-dev intl-format-cache
npm install --save-dev intl-messageformat
npm install --save-dev intl-relativeformat
npm install --save-dev intl

Maybe this will give someone an idea on how to fix this properly...