Json 全局NPM命令缺少模块:内容同步失败

Json 全局NPM命令缺少模块:内容同步失败,json,node.js,npm,contentful,Json,Node.js,Npm,Contentful,我在全球安装了一个NPM模块,如下所示: sudo npm install -g contentful-space-sync 安装会标记警告,但不确定这是否是问题: npm WARN peerDependencies The peer dependency stream-browserify@* included from bl will no npm WARN peerDependencies longer be automatically installed to fulfill the

我在全球安装了一个NPM模块,如下所示:

sudo npm install -g contentful-space-sync
安装会标记警告,但不确定这是否是问题:

npm WARN peerDependencies The peer dependency stream-browserify@* included from bl will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
contentful-space-sync@3.0.0 node_modules/contentful-space-sync
├── bluebird@3.1.1
├── yargs@3.31.0 (camelcase@2.0.1, window-size@0.1.4, y18n@3.2.0, decamelize@1.1.2, string-width@1.0.1, os-locale@1.4.0, cliui@3.1.0)
├── npmlog@2.0.0 (ansi@0.3.1, gauge@1.2.4, are-we-there-yet@1.0.5)
├── contentful-batch-libs@2.0.0 (contentful-management@0.7.1, contentful@1.2.1)
└── lodash@3.10.1
安装似乎有效。要运行该模块,最简单的方法是为其创建一个配置文件,我做到了:

{
  "sourceSpace": "xxxxxxxx",
  "destinationSpace": "xxxxxxxx",
  "sourceDeliveryToken": "xxxxxxxx",
  "managementToken": "xxxxxxxx"
}
现在,我以如下方式运行模块:

contentful-space-sync --config config.json
但我得到了以下错误:

module.js:339
    throw err;
    ^

Error: Cannot find module 'babel-register'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/contentful-space-sync/index.js:5:5)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/contentful-space-sync/bin/space-sync:4:20)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)
    at node.js:961:3
module.js:339
犯错误;
^
错误:找不到模块“babel寄存器”
在Function.Module.\u解析文件名(Module.js:337:15)
在Function.Module.\u加载(Module.js:287:25)
at Module.require(Module.js:366:17)
根据需要(module.js:385:17)
反对。(/usr/local/lib/node_modules/contentful space sync/index.js:5:5)
在模块处编译(Module.js:435:26)
在Object.Module.\u extensions..js(Module.js:442:10)
在Module.load(Module.js:356:32)
在Function.Module.\u加载(Module.js:311:12)
at Module.require(Module.js:366:17)
根据需要(module.js:385:17)
反对。(/usr/local/lib/node_modules/contentful space sync/bin/space sync:4:20)
在模块处编译(Module.js:435:26)
在Object.Module.\u extensions..js(Module.js:442:10)
在Module.load(Module.js:356:32)
在Function.Module.\u加载(Module.js:311:12)
位于Function.Module.runMain(Module.js:467:10)
启动时(node.js:134:18)
在node.js:961:3

对于全球安装的模块,我从未遇到过类似的情况。为什么它找不到它需要的模块?我该如何解决这个问题?

这是一个糟糕的版本。我们已经意识到这个问题,正在努力解决


现在最好使用2.1.9。您可以使用npm install-g contentful space安装它-sync@2.1.9这是一个糟糕的版本。我们已经意识到这个问题,正在努力解决


现在最好使用2.1.9。您可以使用npm install-g contentful space安装它-sync@2.1.9

谢谢,我现在就试试。谢谢,我现在就试试。