Strider-CD / strider

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

pm2 install strider #983

Open Arkotek opened 7 years ago

Arkotek commented 7 years ago

I manage to install Strider CD via pm2 but it does not starts:

$ npm install pm2@next -g
$ pm2 install strider
$ pm2 logs

0|strider  | 31284 died 1 null
0|strider  | 31298 forked
0|strider  | { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
0|strider  | js-bson: Failed to load c++ bson extension, using pure JS version
0|strider  | 2016-08-17T14:36:42.593Z - error: Strider seems to have been misconfigured - there are no available runner plugins. Please make sure all dependencies are up to date.
0|strider  | 31298 died 1 null
0|strider  | 31312 forked
0|strider  | { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
0|strider  | js-bson: Failed to load c++ bson extension, using pure JS version
0|strider  | 2016-08-17T14:36:43.880Z - error: Strider seems to have been misconfigured - there are no available runner plugins. Please make sure all dependencies are up to date.
0|strider  | 31312 died 1 null
0|strider  | 31326 forked
0|strider  | { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
0|strider  | js-bson: Failed to load c++ bson extension, using pure JS version

It looks like the module is well installed in ~/.pm2/node_modules/strider/

Do you know any quick fix?

knownasilya commented 7 years ago

Have a look at this issue https://github.com/Strider-CD/strider/issues/979 Also which version of Node are you using?

Arkotek commented 7 years ago

Node.js 4.4.5

In the logs below above it's displayed

0|strider  | 2016-08-17T14:36:43.880Z - error: Strider seems to have been misconfigured - there are no available runner plugins. Please make sure all dependencies are up to date.
knownasilya commented 7 years ago

Sounds like a bad install, because strider-simple-runner is the default runner and included in the dependencies.

oliversalzburg commented 7 years ago

What does pm2 install do?

Arkotek commented 7 years ago

pm2 install does the following things:

Arkotek commented 7 years ago

strider-simple-runner is present in ~/.pm2/node_modules/

Arkotek commented 7 years ago

Ok I tried with more classical steps and I cannot run Strider like that:

$ cd /tmp
$ npm install strider
$ node node_modules/strider/bin/strider

And I get the same error:

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
12918 forked
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
2016-08-18T10:32:01.868Z - error: Strider seems to have been misconfigured - there are no available runner plugins. Please make sure all dependencies are up to date.
12918 died 1 null
12936 forked
oliversalzburg commented 7 years ago

What happens when you try this:

cd /tmp
npm install strider
cd node_modules/strider
./bin/strider
Arkotek commented 7 years ago
arkotek@t450: /tmp/node_modules/strider
>>> ./bin/strider 
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
9950 forked
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
2016-08-18T12:18:26.874Z - error: Strider seems to have been misconfigured - there are no available runner plugins. Please make sure all dependencies are up to date.
9950 died 1 null
9983 forked
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
oliversalzburg commented 7 years ago

Okay, so it's not working directory related. Is the plugin actually there? Can you please give us the output of this:

ls /tmp/node_modules/strider/node_modules | grep strider
ls /tmp/node_modules/strider/node_modules/strider-simple-runner
npm -v
Arkotek commented 7 years ago

ll /tmp/node_modules/strider/node_modules:

ls: cannot access '/tmp/node_modules/strider/node_modules': No such file or directory

ls /tmp/node_modules/strider/node_modules/strider-simple-runner:

ls: cannot access '/tmp/node_modules/strider/node_modules/strider-simple-runner': No such file or directory

ls -latr /tmp/node_modules/strider:

56  mars    28  2014    requirements.txt
472 oct.    16  2014    app.json
15  déc.   9   2014    Procfile
1112    déc.   9   2014    LICENSE.md
6   mars    28  21:15   .npmignore
77  mars    28  21:15   Gemfile.lock
30  mars    28  21:15   Gemfile
466 mars    28  21:15   .editorconfig
2421    mars    28  21:15   CONTRIBUTING.md
179 mars    28  21:15   .buildpacks
135 mars    28  21:15   apidoc.json
793 avril   10  22:26   shim.js
1629    avril   10  22:26   bower.json
4096    avril   10  22:26   bin
132 mai 3   23:11   .travis.yml
0   mai 5   16:47   .restart
1378    juin    17  14:34   dev.sh
10700   juil.   20  15:30   README.md
4316    juil.   20  15:30   main.js
4096    juil.   20  15:30   .idea
582 juil.   20  15:30   .eslintrc
7584    juil.   20  15:30   CHANGELOG.md
49  juil.   20  15:30   .bowerrc
4096    août   18  12:31   bower_components
4096    août   18  12:31   client
4096    août   18  12:31   dist
4096    août   18  12:31   docs
4096    août   18  12:31   failures
4096    août   18  12:31   lib
4096    août   18  12:31   public
4096    août   18  12:31   vendor
6326    août   18  12:31   package.json
4096    août   18  12:31   .
16384   août   18  12:31   ..

npm -v

>>> npm -v
3.9.6

-> Flatened node modules tree

oliversalzburg commented 7 years ago

WTF O__o There's no node_modules at all?

oliversalzburg commented 7 years ago

When I npm i strider, the result looks like this: image

Arkotek commented 7 years ago

Doing npm install strider or any other packet will generate a node_module directory for sure so you will end up having a /tmp/node_modules/strider (I dont understand why you have /tmp/strider if you did npm install strider insiude the /tmp/ folder).

You may need to upgrade to more recent NPM version to see that now the npm install flatten up all module tree

Asciicinema: https://asciinema.org/a/3wvrdr7lijtu6nj8tg3u916in Install has been finished at 2:20

knownasilya commented 7 years ago

npm install was done inside of the strider directory after cloning, otherwise you need to install strider with npm install -g strider which would give you a strider command in the shell.


Sounds like we need a wiki entry on how to setup Strider with PM2, since it seems to keep coming up.

oliversalzburg commented 7 years ago

Ah, I see it now. Confusingly, there was a git checkout of strider in my /tmp :P Yeah, npm i strider will not produce a valid application as it seems. Part of the problem here is how Strider tries to load plugins and where it expects them to exist. This could possibly be fixed.

Arkotek commented 7 years ago

How to fix this directory problem?

oliversalzburg commented 7 years ago
git clone https://github.com/Strider-CD/strider.git
cd strider
npm install

Using npm to install strider doesn't work at all apparently :\