npm install -g jspm失败

时间:2017-05-31 06:31:47

标签: npm npm-install jspm

突然,我的CI版本因此错误而失败。 可能导致这种情况的任何想法?

npm install -g jspm
Unhandled rejection TypeError: base64 is not a function
    at Function.from (native)
    at Function.from (native)
    at bufFrom (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/ssri/index.js:337:31)
    at Hash.hexDigest (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/ssri/index.js:34:27)
    at contentPath (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/cacache/lib/content/path.js:20:31)
    at moveToDestination (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:131:23)
    at /opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:39:7
    at tryCatcher (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
    at /opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
    at /opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:99:16
    at /opt/circleci/nodejs/v4.2.6/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:43:10

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2017-05-31T06_19_59_153Z-debug.log

1 个答案:

答案 0 :(得分:1)

更新nodejs

4.2.5到4.5.0解决了问题