Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.59k stars 432 forks source link

strider-ecosystem-client dependency failed to install #885

Closed macropin closed 8 years ago

macropin commented 8 years ago

All my recent docker container builds for strider have failed to start. The container gets stuck in a loop throwing the error

--- snip
Nov 10 00:39:07 vc1 systemd-docker[20262]: 466 forked
Nov 10 00:39:08 vc1 systemd-docker[20262]: { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
Nov 10 00:39:08 vc1 systemd-docker[20262]: js-bson: Failed to load c++ bson extension, using pure JS version
Nov 10 00:39:17 vc1 systemd-docker[20262]: 2015-11-10T00:39:16.997Z - info: Using SMTP transport from config
Nov 10 00:39:18 vc1 systemd-docker[20262]: module.js:339
Nov 10 00:39:18 vc1 systemd-docker[20262]: throw err;
Nov 10 00:39:18 vc1 systemd-docker[20262]: ^
Nov 10 00:39:18 vc1 systemd-docker[20262]: Error: Cannot find module 'strider-cli/node_modules/strider-ecosystem-client'
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Function.Module._resolveFilename (module.js:337:15)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Function.Module._load (module.js:287:25)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module.require (module.js:366:17)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at require (module.js:385:17)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Object.<anonymous> (/opt/strider/lib/routes/admin/plugins/get_plugin_list.js:8:14)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module._compile (module.js:425:26)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Object.Module._extensions..js (module.js:432:10)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module.load (module.js:356:32)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Function.Module._load (module.js:311:12)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module.require (module.js:366:17)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at require (module.js:385:17)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Object.<anonymous> (/opt/strider/lib/routes/admin/plugins/index.js:4:21)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module._compile (module.js:425:26)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Object.Module._extensions..js (module.js:432:10)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module.load (module.js:356:32)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Function.Module._load (module.js:311:12)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module.require (module.js:366:17)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at require (module.js:385:17)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Object.<anonymous> (/opt/strider/lib/routes/admin/index.js:116:19)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module._compile (module.js:425:26)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Object.Module._extensions..js (module.js:432:10)
Nov 10 00:39:18 vc1 systemd-docker[20262]: at Module.load (module.js:356:32)
Nov 10 00:39:18 vc1 systemd-docker[20262]: 466 died 1 null
Nov 10 00:39:18 vc1 systemd-docker[20262]: 471 forked
Nov 10 00:39:18 vc1 systemd-docker[20262]: { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
Nov 10 00:39:18 vc1 systemd-docker[20262]: js-bson: Failed to load c++ bson extension, using pure JS version
--- end snip

The workaround is to duplicate the strider-ecosystem-client code:

strider@213cb16172d1:/opt/strider/node_modules$ cp -a strider-ecosystem-client strider-cli/node_modules/

The container then can continue to start normally.

Any ideas where this is broken? Is this a dependency issue / bug with strider-ecosystem-client? Also any ideas how to clear the c++ bson warning?

davemackintosh commented 8 years ago

To clear the bson warning you need to have some kind of toolchain installed on your machine and node-gyp (what OS is your container?) and then npm rebuild will fix it.

Not sure what's causing the error RE a missing dependency. @knownasilya has there been a code regression?

knownasilya commented 8 years ago

Nothing that I know of..

macropin commented 8 years ago

@davemackintosh The container is built with the Docker official node:latest image. I'd expect all the required tooling to be included.

knownasilya commented 8 years ago

Is that 5.x?

macropin commented 8 years ago

Yes, latest is currently also tagged 5.0 This is the Dockerfile.

knownasilya commented 8 years ago

Looks like an issue with npm3, and how it has changed dependencies. I think it has to do with this line: https://github.com/Strider-CD/strider/blob/master/lib/routes/admin/plugins/get_plugin_list.js#L8

knownasilya commented 8 years ago

Solution might be exposing the client through the strider-cli module, or installing it directly.

knownasilya commented 8 years ago

Give master a try.

macropin commented 8 years ago

@knownasilya thanks, my latest build seems to work fine.