SynchroLabs / SynchroServer

The Synchro Server platform
https://synchro.io
1 stars 2 forks source link

npm install errors #50

Closed BobDickinson closed 8 years ago

BobDickinson commented 8 years ago

When installing Synchro via the CLI or using npm install, you may see errors like these:

npm ERR! Cannot read property 'emit' of null
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "--only=dev" "--loglevel=error" "install"
npm ERR! node v5.4.1
npm ERR! npm  v3.7.5

npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/bob/Dev/Test2/npm-debug.log
npm ERR! code 1
]
  killed: false,
  code: 1,
  signal: null,
  cmd: '/bin/sh -c npm --only=dev --loglevel=error install' }

These errors come from npm (actually from the "request" module they use). The issue is discussed here: https://github.com/npm/npm/issues/9984

In our experience, the installation does actually succeed. To verify this, if you ran the Synchro CLI command synchro init and got these errors, just run synchro update to confirm the installation. If you ran npm install manually, just run it again and it should run clean.

This is pretty ugly, but not clear how soon it's going away. The underlying "request" module team doesn't seem to have a fix coming any time soon, and they've known about the problem for 6+ months. It's not clear whether the npm team can or will address this without a fix from request, but they have known about it for 9+ months and haven't done so yet.

Maybe we should just pack the whole distribution into the synchro.tgz tarball that the Synchro CLI installs/expands and abandon npm entirely for end-user installs.

BobDickinson commented 8 years ago

We eliminated this behavior by moving the synchro-* deps into npm (the npm bug is still there, but we don't see it any more).