I've globally installed an NPM module like so:
sudo npm install -g contentful-space-sync
The install flags a warning, but not sure if this is an issue:
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
Install seems to work. To run the module, it's easiest to create a config file for it, which I did:
{
"sourceSpace": "xxxxxxxx",
"destinationSpace": "xxxxxxxx",
"sourceDeliveryToken": "xxxxxxxx",
"managementToken": "xxxxxxxx"
}
Now I run the module like this:
contentful-space-sync --config config.json
But I get the following error:
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
I've never had something like this for a globally installed module. Why can't it find a module it needs and how do I fix this?
this was a bad release. We're aware of the issue and working on a fix.
For now the best thing is to use 2.1.9. You can install it with npm install -g contentful-space-sync@2.1.9