jspm / jspm-cli

ES Module Package Manager
https://jspm.org
Apache License 2.0
3.77k stars 273 forks source link

0.17.0-beta.17: Upgrading 0.16.x project fails when attempting to call indexOf on undefined #1894

Closed larrifax closed 8 years ago

larrifax commented 8 years ago

I'm attempting to upgrade my 0.16.x project to 0.17.0-beta.17, but it fails with the following error.

λ jspm i
jspm will now attempt to upgrade your project to the 0.17 configuration.
Are you sure you want to proceed? [Yes]: Yes

     Upgrading jspm 0.16 Node core libraries to jspm 0.17 universal implementations...

     Checking all overrides into the package.json file to ensure reproducibility independent of the jspm registry...

err  TypeError: Cannot read property 'indexOf' of undefined
    at new Package (C:\code\ALW\src\ALW.Web\node_modules\jspm\lib\package-name.js:33:11)
    at C:\code\ALW\src\ALW.Web\node_modules\jspm\lib\config\index.js:247:19
    at Array.map (native)
    at C:\code\ALW\src\ALW.Web\node_modules\jspm\lib\config\index.js:246:47
    at tryCatcher (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\promise.js:502:31)
    at Promise._settlePromise (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\promise.js:559:18)
    at Promise._settlePromise0 (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\promise.js:604:10)
    at Promise._settlePromises (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\promise.js:683:18)
    at Async._drainQueue (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\async.js:138:16)
    at Async._drainQueues (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (C:\code\ALW\src\ALW.Web\node_modules\jspm\node_modules\bluebird\js\release\async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

warn Installation changes not saved.

This is the content of the jspm-part of package.json:

  "jspm": {
    "directories": {
      "baseURL": "wwwroot"
    },
    "dependencies": {
      "@angular/common": "npm:@angular/common@2.0.0-rc.1",
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "@angular/http": "npm:@angular/http@2.0.0-rc.1",
      "@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic@2.0.0-rc.1",
      "@angular/router-deprecated": "npm:@angular/router-deprecated@2.0.0-rc.1",
      "@ngrx/store": "npm:@ngrx/store@2.0.0",
      "es6-shim": "npm:es6-shim@0.35.1",
      "jquery": "npm:jquery@2.2.4",
      "lodash": "npm:lodash@4.13.1",
      "moment": "npm:moment@2.13.0",
      "ms-signalr-client": "npm:ms-signalr-client@2.2.2",
      "normalizr": "npm:normalizr@2.1.0",
      "oidc-client": "npm:oidc-client@1.0.1",
      "perfect-scrollbar": "npm:perfect-scrollbar@0.6.11",
      "reflect-metadata": "npm:reflect-metadata@0.1.3",
      "rfc6902": "npm:rfc6902@1.2.1",
      "rxjs": "npm:rxjs@5.0.0-beta.6",
      "tether": "npm:tether@1.3.2",
      "zone.js": "npm:zone.js@0.6.12"
    },
    "devDependencies": {},
    "overrides": {
      "npm:oidc-client@1.0.1": {
        "main": "lib/oidc-client.js"
      },
      "npm:tether@1.2.0": {
        "format": "global"
      }
    }
  }
guybedford commented 8 years ago

This is really great to know about, thanks for posting.

Can you share the config.js file here before the upgrade at all?

larrifax commented 8 years ago

Sure. This is it:

System.config({
  defaultJSExtensions: true,
  transpiler: false,
  paths: {
    "github:*": "jspm_packages/github/*",
    "npm:*": "jspm_packages/npm/*"
  },

  packages: {
    "app": {
      "main": "bootstrap"
    }
  },

  meta: {
    "ms-signalr-client/jquery.signalr-2.2.0": {
      "globals": {
        "jQuery": "jquery",
        "$": "jquery"
      }
    }
  },

  map: {
    "@angular/common": "npm:@angular/common@2.0.0-rc.1",
    "@angular/core": "npm:@angular/core@2.0.0-rc.1",
    "@angular/http": "npm:@angular/http@2.0.0-rc.1",
    "@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic@2.0.0-rc.1",
    "@angular/router-deprecated": "npm:@angular/router-deprecated@2.0.0-rc.1",
    "@ngrx/store": "npm:@ngrx/store@2.0.0",
    "crypto": "@empty",
    "es6-shim": "npm:es6-shim@0.35.1",
    "jquery": "npm:jquery@2.2.4",
    "larrifax/oidc-client": "github:larrifax/oidc-client@0.4.0",
    "lodash": "npm:lodash@4.13.1",
    "moment": "npm:moment@2.13.0",
    "ms-signalr-client": "npm:ms-signalr-client@2.2.2",
    "normalizr": "npm:normalizr@2.1.0",
    "oidc-client": "npm:oidc-client@1.0.1",
    "perfect-scrollbar": "npm:perfect-scrollbar@0.6.11",
    "reflect-metadata": "npm:reflect-metadata@0.1.3",
    "rfc6902": "npm:rfc6902@1.2.1",
    "rxjs": "npm:rxjs@5.0.0-beta.6",
    "tether": "npm:tether@1.3.2",
    "zone.js": "npm:zone.js@0.6.12",
    "github:jspm/nodelibs-assert@0.1.0": {
      "assert": "npm:assert@1.4.1"
    },
    "github:jspm/nodelibs-buffer@0.1.0": {
      "buffer": "npm:buffer@3.6.0"
    },
    "github:jspm/nodelibs-path@0.1.0": {
      "path-browserify": "npm:path-browserify@0.0.0"
    },
    "github:jspm/nodelibs-process@0.1.2": {
      "process": "npm:process@0.11.3"
    },
    "github:jspm/nodelibs-util@0.1.0": {
      "util": "npm:util@0.10.3"
    },
    "npm:@angular/common@2.0.0-rc.1": {
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:@angular/compiler@2.0.0-rc.1": {
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:@angular/core@2.0.0-rc.1": {
      "process": "github:jspm/nodelibs-process@0.1.2",
      "rxjs": "npm:rxjs@5.0.0-beta.6",
      "zone.js": "npm:zone.js@0.6.12"
    },
    "npm:@angular/http@2.0.0-rc.1": {
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "rxjs": "npm:rxjs@5.0.0-beta.6"
    },
    "npm:@angular/platform-browser-dynamic@2.0.0-rc.1": {
      "@angular/common": "npm:@angular/common@2.0.0-rc.1",
      "@angular/compiler": "npm:@angular/compiler@2.0.0-rc.1",
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "@angular/platform-browser": "npm:@angular/platform-browser@2.0.0-rc.1",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:@angular/platform-browser@2.0.0-rc.1": {
      "@angular/common": "npm:@angular/common@2.0.0-rc.1",
      "@angular/compiler": "npm:@angular/compiler@2.0.0-rc.1",
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:@angular/router-deprecated@2.0.0-rc.1": {
      "@angular/common": "npm:@angular/common@2.0.0-rc.1",
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "@angular/platform-browser": "npm:@angular/platform-browser@2.0.0-rc.1"
    },
    "npm:@ngrx/core@1.0.0": {
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "rxjs": "npm:rxjs@5.0.0-beta.6"
    },
    "npm:@ngrx/store@2.0.0": {
      "@angular/core": "npm:@angular/core@2.0.0-rc.1",
      "@ngrx/core": "npm:@ngrx/core@1.0.0",
      "rxjs": "npm:rxjs@5.0.0-beta.6"
    },
    "npm:assert@1.4.1": {
      "assert": "github:jspm/nodelibs-assert@0.1.0",
      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
      "process": "github:jspm/nodelibs-process@0.1.2",
      "util": "npm:util@0.10.3"
    },
    "npm:babel-polyfill@6.9.1": {
      "babel-runtime": "npm:babel-runtime@6.9.2",
      "core-js": "npm:core-js@2.4.0",
      "process": "github:jspm/nodelibs-process@0.1.2",
      "regenerator-runtime": "npm:regenerator-runtime@0.9.5"
    },
    "npm:babel-runtime@6.9.2": {
      "core-js": "npm:core-js@2.4.0",
      "regenerator-runtime": "npm:regenerator-runtime@0.9.5"
    },
    "npm:buffer@3.6.0": {
      "base64-js": "npm:base64-js@0.0.8",
      "child_process": "github:jspm/nodelibs-child_process@0.1.0",
      "fs": "github:jspm/nodelibs-fs@0.1.2",
      "ieee754": "npm:ieee754@1.1.6",
      "isarray": "npm:isarray@1.0.0",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:core-js@2.4.0": {
      "fs": "github:jspm/nodelibs-fs@0.1.2",
      "path": "github:jspm/nodelibs-path@0.1.0",
      "process": "github:jspm/nodelibs-process@0.1.2",
      "systemjs-json": "github:systemjs/plugin-json@0.1.2"
    },
    "npm:es6-shim@0.35.1": {
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:inherits@2.0.1": {
      "util": "github:jspm/nodelibs-util@0.1.0"
    },
    "npm:isarray@1.0.0": {
      "systemjs-json": "github:systemjs/plugin-json@0.1.0"
    },
    "npm:jsrsasign@5.0.12": {
      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
      "fs": "github:jspm/nodelibs-fs@0.1.2",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:lodash@4.13.1": {
      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:ms-signalr-client@2.2.2": {
      "jquery": "npm:jquery@2.2.4"
    },
    "npm:normalizr@2.1.0": {
      "lodash": "npm:lodash@4.13.1"
    },
    "npm:oidc-client@1.0.1": {
      "babel-polyfill": "npm:babel-polyfill@6.9.1",
      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
      "jsrsasign": "npm:jsrsasign@5.0.12",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:path-browserify@0.0.0": {
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:process@0.11.3": {
      "assert": "github:jspm/nodelibs-assert@0.1.0"
    },
    "npm:regenerator-runtime@0.9.5": {
      "path": "github:jspm/nodelibs-path@0.1.0",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:rxjs@5.0.0-beta.6": {
      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:util@0.10.3": {
      "inherits": "npm:inherits@2.0.1",
      "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:zone.js@0.6.12": {
      "buffer": "github:jspm/nodelibs-buffer@0.1.0",
      "process": "github:jspm/nodelibs-process@0.1.2"
    }
  }
});
guybedford commented 8 years ago

Thanks so much, that helped find it and I've included a fix in https://github.com/jspm/jspm-cli/commit/dfaf1c370d2995b2938d009c972b692e54fc2a7a.

guybedford commented 8 years ago

Released in 0.17.0-beta.19.