Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Problem with installation #1

Closed
alessioguglielmo opened this issue Feb 12, 2015 · 19 comments
Closed

Problem with installation #1

alessioguglielmo opened this issue Feb 12, 2015 · 19 comments

Comments

@alessioguglielmo
Copy link

Hi,

I followed the howto in readme in order to install the core
I have a problem when I run

node server.js

The command doesn't show any error and nothing happens

@jhausladen
Copy link

Try "node server.js -p 8181 -l 0.0.0.0"

@alessioguglielmo
Copy link
Author

Tried. Same behaviour.

@nightwing
Copy link
Member

That's odd. Which version of node/OS do you use?
Try adding some log calls in https://github.com/c9/core/blob/master/server.js#L77 to see where it gets stuck.

@alessioguglielmo
Copy link
Author

Ubuntu 14.10
nodejs 0.10.25

@javruben
Copy link

Questions:

  • Did you run scripts/install-sdk.sh? Was it successful?
  • If you run node server.js --help what do you get?
  • Have you added the log calls as @nightwing suggested? What did you see?

@alessioguglielmo
Copy link
Author

root@2754e204c37e:~/c9sdk# node server.js --help
root@2754e204c37e:~/c9sdk# 

The installation seems to be completed successfully.
Where can I get logs?

@javruben
Copy link

Could you run the installation again and paste the last 10 lines of the output.

What happens if you run this:

node -e "console.log('test')"

@alessioguglielmo
Copy link
Author

/bin/mkdir -p /root/.c9/local/share/man/man1
/usr/bin/install -c -m 644 ./tmux.1.mdoc \
        /root/.c9/local/share/man/man1/tmux.1
make[2]: Leaving directory `/root/.c9/tmux-1.9'
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/root/.c9/tmux-1.9'
bash: line 262: python: command not found
bash: line 262: [: -eq: unary operator expected
Installed tmux does not appear to work:
root@2754e204c37e:~/c9sdk# 

re-trying the installation it show me this.
It crashes during compiling maybe

@javruben
Copy link

It looks like the installation has failed. If it had worked, you wouldn't see this.

It looks like python is not installed. Could you install python 2.7 and retry?

@alessioguglielmo
Copy link
Author

mmh strange, during first installation I didn't noticed anything

@alessioguglielmo
Copy link
Author

sqlite3/.deps/shell.Po
sqlite3/.deps/sqlite3.Plo

real    1m58.251s
user    0m4.722s
sys 0m1.263s
~/.c9/node_modules/.bin ~/.c9/lib
~/.c9/lib
:Done.
+ c9packages=(`node -e 'console.log(Object.keys(require("./package.json").c9plugins).join(" "))'`)
++ node -e 'console.log(Object.keys(require("./package.json").c9plugins).join(" "))'

root@2754e204c37e:~/c9sdk# node -e "console.log('test')"
root@2754e204c37e:~/c9sdk# node server.js --help
root@2754e204c37e:~/c9sdk# node server.js          
root@2754e204c37e:~/c9sdk#   

Installed python.
Now the output is the same I obtained during first installation :)

@javruben
Copy link

That's odd. The script should end with these lines:
https://github.com/c9/core/blob/master/scripts/install-sdk.sh#L80

Anyway, I think I see the problem. The node you have is not the Node.js executable.

Can you try to execute this:

~/.c9/node/bin/node -e "console.log('test')"

@alessioguglielmo
Copy link
Author

root@2754e204c37e:~/c9sdk# ~/.c9/node/bin/node server.js

module.js:340
    throw err;
          ^
Error: Cannot find module '../plugins/c9.ide.run/runners_list'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at module.exports (/root/c9sdk/settings/standalone.js:10:19)
    at start (/root/c9sdk/server.js:87:77)
    at /root/c9sdk/server.js:71:13
    at Array.forEach (native)
    at main (/root/c9sdk/server.js:64:13)
    at /root/c9sdk/server.js:66:20
root@2754e204c37e:~/c9sdk# 

Yep... right, however
I've installed some packages with npm install... amd-loader and other stuff, but it shows to me other errors.
Maybe some error related to missing packages....

@javruben
Copy link

Yes, the installation has failed. Please try to restart from scratch. Do this:

rm -Rf ~/.c9
rm -Rf c9sdk

to clean up.

Then make sure tmux is installed. Check via:

which tmux

If that gives no result, install it like so:

sudo apt-get install tmux

Then make sure to install the right version of node:

sudo apt-get remove node
sudo apt-get install nodejs

Then do this again:

git clone https://github.com/c9/core.git c9sdk
cd c9sdk
./scripts/install-sdk.sh

@alessioguglielmo
Copy link
Author

real    0m30.330s
user    0m4.315s
sys 0m1.109s
~/.c9/node_modules/.bin ~/.c9/lib
~/.c9/lib
:Done.
+ c9packages=(`node -e 'console.log(Object.keys(require("./package.json").c9plugins).join(" "))'`)
++ node -e 'console.log(Object.keys(require("./package.json").c9plugins).join(" "))'
./scripts/install-sdk.sh: line 62: node: command not found
root@3ecb7e7d070c:~/c9sdk# ~/.c9/node/bin/node server.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'amd-loader'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/root/c9sdk/server.js:4:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
root@3ecb7e7d070c:~/c9sdk# 

Ok, tried to restart from zero, same error as earlier.

Problem with amd-loader is fixed by installing requirejs module

@javruben
Copy link

@alessioguglielmo You must see what I'm seeing:

./scripts/install-sdk.sh: line 62: node: command not found

You cannot expect this to work if the installer doesn't complete successfully.

Did any of the steps I specified fail? They must've because the error says that node is not installed.

Please make sure node is installed and working correctly.

@alessioguglielmo
Copy link
Author

What makes you think that I expect this to work? :)

For node, I followed the steps as you said. Perhaps is related to node version, but I updated with apt-get...

sudo apt-get remove node
sudo apt-get install nodejs

@alessioguglielmo
Copy link
Author

Ok, found and fixed.
node must be manually installed along with nodejs (... and not removed as you said)
then must be set the path in the env and installed npm to correctly get modules.
Then re-try & go.

apt-get install -y node
export PATH=/usr/local/bin:$PATH
apt-get install npm
./scripts/install-sdk.sh 

rusha@0.7.8 node_modules/rusha
├── grunt@0.4.5 (which@1.0.8, dateformat@1.0.2-1.2.3, eventemitter2@0.4.14, getobject@0.1.0, rimraf@2.2.8, colors@0.6.2, hooker@0.2.3, async@0.1.22, grunt-legacy-util@0.2.0, exit@0.1.2, lodash@0.9.2, coffee-script@1.3.3, underscore.string@2.2.1, iconv-lite@0.2.11, grunt-legacy-log@0.1.1, glob@3.1.21, nopt@1.0.10, js-yaml@2.0.5, minimatch@0.2.14, findup-sync@0.1.3)
└── grunt-contrib-connect@0.8.0 (connect-livereload@0.4.1, open@0.0.5, async@0.9.0, portscanner@0.2.3, connect@2.19.6)
+ echo 'Success!'
Success!
+ echo 'run '\''node server.js -p 8181 -l 0.0.0.0'\'' to launch Cloud9'
run 'node server.js -p 8181 -l 0.0.0.0' to launch Cloud9
root@b430318a0927:~/c9sdk# node server.js -p 8181 -l 0.0.0.0
Connect server listening at http://0.0.0.0:8181
CDN: version standalone initialized /root/c9sdk/build
Started '/root/c9sdk/configs/standalone' with config 'standalone'!

;)

@javruben
Copy link

Yay!

lennartcl added a commit that referenced this issue Feb 23, 2015
Fixed server_handler_wrapper stacking callbacks
javruben pushed a commit that referenced this issue Mar 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants