错误的ERR! jspm捆绑

时间:2016-07-29 09:55:44

标签: node.js npm jspm

我正在克隆已经存在的项目。在我构建时,我将此错误保存在npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'c:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'bundle-dep' ]
2 info using npm@2.10.1
3 info using node@v0.12.4
4 verbose run-script [ 'prebundle-dep', 'bundle-dep', 'postbundle-dep' ]
5 info prebundle-dep sdk@1.0.0
6 info bundle-dep sdk@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info sdk@1.0.0 Failed to exec bundle-dep script
9 verbose stack Error: sdk@1.0.0 bundle-dep: `jspm bundle "src - [src/**/*] - [components/**/*]" www/bundle.js`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (c:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (c:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid sdk@1.0.0
11 verbose cwd c:\GIT\mas\Rapid\hide
12 error Windows_NT 6.1.7601
13 error argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "bundle-dep"
14 error node v0.12.4
15 error npm  v2.10.1
16 error code ELIFECYCLE
17 error sdk@1.0.0 bundle-dep: `jspm bundle "src - [src/**/*] - [components/**/*]" www/bundle.js`
17 error Exit status 1
18 error Failed at the sdk@1.0.0 bundle-dep script 'jspm bundle "src - [src/**/*] - [components/**/*]" www/bundle.js'.
18 error This is most likely a problem with the sdk package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     jspm bundle "src - [src/**/*] - [components/**/*]" www/bundle.js
18 error You can get their info via:
18 error     npm owner ls sdk
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

虽然这里是package.json

{
  "name": "sdk",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "postinstall": "typings install && bower install --production && jspm install && node src/tools/updateDependencies.js && npm run bundle-dep",
    "_jspm": "jspm install",
    "_postjspm": "node src/tools/updateDependencies.js && npm run bundle-dep",
    "bundle-dep": "jspm bundle \"src - [src/**/*] - [components/**/*]\" www/bundle.js",
    "start": "node dev-server.js"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "jspm": "^0.17.0-beta.12",
    "typings": "^0.7.12"
  },
  "devDependencies": {
    "angular2": "2.0.0-beta.15",
    "chokidar-socket-emitter": "^0.3.1",
    "express": "^4.13.4",
    "open": "0.0.5",
    "rxjs": "5.0.0-beta.2",
    "spdy": "^3.2.3"
  },
  "jspm": {
    "name": "sdk",
    "directories": {
      "lib": "src"
    },
    "dependencies": {
      "angular2": "npm:angular2@2.0.0-beta.15",
      "es6-shim": "github:es-shims/es6-shim@^0.35.0",
      "json": "github:systemjs/plugin-json@^0.1.0",
      "systemjs-hot-reloader": "github:capaj/systemjs-hot-reloader@^0.5.6"
    },
    "devDependencies": {
      "os": "github:jspm/nodelibs-os@^0.2.0-alpha",
      "plugin-typescript": "github:frankwallis/plugin-typescript@^4.0.5"
    },
    "peerDependencies": {
      "assert": "github:jspm/nodelibs-assert@^0.2.0-alpha",
      "fs": "github:jspm/nodelibs-fs@^0.2.0-alpha",
      "net": "github:jspm/nodelibs-net@^0.2.0-alpha",
      "process": "github:jspm/nodelibs-process@^0.2.0-alpha",
      "reflect-metadata": "npm:reflect-metadata@0.1.2",
      "rxjs": "npm:rxjs@^5.0.0-beta.2",
      "tty": "github:jspm/nodelibs-tty@^0.2.0-alpha",
      "util": "github:jspm/nodelibs-util@^0.2.0-alpha",
      "zone.js": "npm:zone.js@^0.6.6"
    },
    "overrides": {
      "npm:angular2@2.0.0-beta.15": {
        "main": false,
        "dependencies": {
          "reflect-metadata": "npm:reflect-metadata@0.1.2",
          "rxjs": "npm:rxjs@^5.0.0-beta.2",
          "zone.js": "npm:zone.js@^0.6.6"
        },
        "peerDependencies": {
          "reflect-metadata": "npm:reflect-metadata@0.1.2",
          "rxjs": "npm:rxjs@^5.0.0-beta.2",
          "zone.js": "npm:zone.js@^0.6.6"
        },
        "jspmNodeConversion": false,
        "map": {
          "crypto": "@empty"
        },
        "meta": {
          "src/*.js": {
            "deps": [
              "reflect-metadata",
              "zone.js"
            ]
          }
        },
        "format": "detect"
      },
      "npm:debug@2.2.0": {
        "main": "browser.js",
        "jspmNodeConversion": false,
        "format": "cjs",
        "map": {
          "./browser.js": {
            "node": "./node.js"
          },
          "fs": "@node/fs",
          "net": "@node/net",
          "tty": "@node/tty",
          "util": "@node/util"
        }
      },
      "npm:ms@0.7.1": {
        "jspmNodeConversion": false,
        "format": "cjs"
      },
      "npm:reflect-metadata@0.1.2": {
        "map": {
          "crypto": "@empty"
        }
      },
      "npm:typescript@1.8.9": {
        "browser": {},
        "map": {
          "buffer": "@empty",
          "child_process": "@empty",
          "fs": "@empty",
          "path": "@empty",
          "process": "@empty",
          "readline": "@empty"
        }
      }
    }
  }
}

问题似乎出现在bundle-dep scripts下。什么可能出错?

1 个答案:

答案 0 :(得分:0)

该错误是由作为安装的一部分触发的脚本引起的。

这是在package.json中:

 "scripts": {
    "postinstall": ... && jspm install ..."

看起来这个包期望你已经全局安装了jspm

如果您信任this package,则可以运行npm install -g jspm并重试。

更多文件here