jspm / registry

The jspm registry and package.json override service
https://jspm.io
229 stars 255 forks source link

Add aws-sdk@2.4.0 override. #926

Closed fluffywaffles closed 8 years ago

fluffywaffles commented 8 years ago

Use aws-sdk dist bundle as a global.

fluffywaffles commented 8 years ago

Updated per your suggestions, @guybedford !

guybedford commented 8 years ago

Great, thanks for the PR.

fluffywaffles commented 8 years ago

@guybedford

The same overrides work for aws-sdk@2.4.2, which was just released. It looks like, usually, you only keep one version of overrides around - should I make a new PR for 2.4.2?

Just realized there was a new version! Sorry!

guybedford commented 8 years ago

Overrides apply for all versions semver compatible with the override. So you only need to worry about this for version 3.

fluffywaffles commented 8 years ago

@guybedford

This was working moments ago, but suddenly it has stopped working?

The aws-sdk version is the same. I'd hate to think this was only working due to some kind of fluke on my system, but all of a sudden I'm getting a brand-new error message:

err  (SystemJS) /media/Data/dev/work/encurate/cognito-proof-of-concept/jspm_packages/npm/aws-sdk@2.4.2/dist/aws-sdk.js:16304
  global[AWS] = AWS;
                  ^
  ReferenceError: AWS is not defined
      at /media/Data/dev/work/encurate/cognito-proof-of-concept/jspm_packages/npm/aws-sdk@2.4.2/dist/aws-sdk.js:16304:17
      at Object.exports.runInThisContext (vm.js:54:17)
  Evaluating /media/Data/dev/work/encurate/cognito-proof-of-concept/jspm_packages/npm/aws-sdk@2.4.2/dist/aws-sdk.js
  Error loading /media/Data/dev/work/encurate/cognito-proof-of-concept/src/app.js
fluffywaffles commented 8 years ago

I've figured out part of it. There's a bad (auto-generated?) "map" override in the default aws-sdk@2.4.0.json that breaks the browser build. My previous "map" overwrote that, and now setting "map" to "{}" fixes it. jspm run app still fails, however, with the message above, where it was working before...

guybedford commented 8 years ago

@skorlir perhaps try jspm install npm:aws-sdk@2.4.0 -o to ensure the override is refreshed from the registry for an existing project, otherwise the local override will continue to be used regardless of what is in the registry.