Open guybedford opened 9 years ago
I'm using the following overrides.
"npm:moment-timezone@0.4.1": {
"registry": "jspm",
"dependencies": {
"moment": "npm:moment@^2.10.6"
},
"shim": {
"moment-timezone": {
"deps": [
"moment"
]
}
}
},
"npm:moment@2.10.6": {
"main": "moment",
"format": "global",
"shim": {
"locale/*": {
"deps": [
"../moment"
]
}
}
}
Also...
"github:siddii/angular-timer@1.3.3": {
"main": "dist/angular-timer",
"registry": "jspm",
"format": "global",
"dependencies": {
"angular": "^1.4.1",
"moment": "npm:moment@^2.10.6",
"humanize-duration": "^3.0.0"
},
"shim": {
"dist/angular-timer": {
"deps": [
"angular",
"humanize-duration",
"moment"
]
}
}
},
@lookfirst I've been trying to get moment-timezone to work for an angular module ( https://github.com/alexcheng1982/angular-timezone-select ) but I can't get the timezone data to load correctly. When I break here https://github.com/alexcheng1982/angular-timezone-select/blob/master/dist/angular-timezone-select.js#L5 .tz
is not defined as a property of moment
.
The angular module doesn't have any dependencies defined for moment
or moment-timezone
so I imagine I will either have to add those dependencies directly to my app or modify the file in the angular-timezone-select package directly.
How did you get this working?
I did the overrides above and this import:
import moment from 'moment-timezone';
@lookfirst I'm using this override :
"npm:moment-timezone@0.4.1": {
"map": {
"moment": "moment"
}
}
I'm stuck with the same problem, can't load moment-timezone-with-data
as a main source for moment
. Tried installing with: jspm install npm:moment-timezone -o '{ main: "builds/moment-timezone-with-data", dependencies: { moment: "^2.10.6" }, shim: { "moment-timezone": { deps: [ "moment" ] } } }'
but that didn't help much.
I suspect it has something to do with loading moment-timezone multiple times. As the errors are pretty similar - https://github.com/moment/moment-timezone/issues/193
Use my overrides above. Works fine.
@lookfirst oh man, if you ever come to visit Cracow, ping me, I owe you some good :beer: :smile: I've spent about 2 hours digging around this problem
Continuing from https://github.com/jspm/jspm-cli/issues/1193