Closed Vadorequest closed 11 years ago
If node app.js
works but sails lift
doesn't, it either means that the global Sails didn't install properly, or the sails.js symlink is incorrect. What do you get from typing which sails
? Can you open the file at the path it outputs?
azureuser@tripanalyzer:~$ which sails
/usr/bin/sails
Content of the file:
#!/usr/bin/env node
var argv = require('optimist').argv;
// Build sails instance
var sails = require('../lib');
sails.config = {
appPath: process.cwd(),
prod: argv.prod,
// Indicate that this is a mock config
mock: true
};
if(argv.verbose){
sails.config.log = {level: 'verbose'};
}
if(argv.port){
sails.config.port = argv.port;
}
require('../lib/configuration')(sails).load(function (err) {
if (err) throw new Error(err);
// Dependencies
var _ = require('lodash'),
utils = require('./utils.js')(sails),
fs = utils.fs,
generate = require('./generate.js')(sails),
newSailsApp = require('./new.js')(sails);
// If coffeescript is not installed, fail silently
try {
require('coffee-script');
sails.log.verbose('Enabling CoffeeScript...');
} catch (e) {
sails.log.verbose('CoffeeScript not installed.');
}
// Stringify args
argv._ = _.map(argv._, function (arg) {
return arg + '';
});
// Known errors
var errors = {
badLocalSails: function (requiredVersion) {
return 'You may consider reinstalling Sails locally (npm install sails@' + requiredVersion + ').';
}
};
// Read package.json file in specified path
function getPackage(path) {
path = require('underscore.string').rtrim(path, '/');
var packageJson = fs.readFileSync(path + '/package.json', 'utf-8');
try {
packageJson = JSON.parse(packageJson);
} catch (e) {
return false;
So... I think that it's ok...
Is node
aliasing nodejs
?
It wasn't. alias node="nodejs"
But still the same.
Do you have any other idea for fix it? Thank you for your help.
Maybe try changing the first line of /usr/bin/sails
to #!/usr/bin/env nodejs
?
It works. Nice! I just have another error, without any link, it's because my port 80 is already used:
azureuser@tripanalyzer:~/trip-analyzer/server$ sails lift
info:
info:
info: Sails.js <|
info: v0.9.4 |\
info: /|.\
info: / || \
info: ,' |' \
info: .-'.-==|/_--'
info: `--'-------'
info: __---___--___---___--___---___--___
info: ____---___--___---___--___---___--___-__
info:
info: Server lifted in `/home/azureuser/trip-analyzer/server`
info: To see your app, visit http://localhost:80
info: To shut down Sails, press <CTRL> + C at any time.
debug: --------------------------------------------------------
debug: :: Wed Sep 25 2013 14:13:17 GMT+0000 (UTC)
debug:
debug: Environment : development
debug: Port : 80
debug: --------------------------------------------------------
warn: error raised: Error: listen EACCES
error: Server doesn't seem to be starting.
error: Perhaps something else is already running on port 80?
I tried to kill the process but I can't see it. It appends often on the vm, I don't know why. Sometimes it died by is own...
Okay, I fixed the problem about the port used. I'm working on the 1337 now. http://tripanalyzer.cloudapp.net:1337/
But I have a problem (again...) I don't have the .js files. If the server is running, just check the javascript errors (f12, console)
GET http://tripanalyzer.cloudapp.net:1337/js/socket.io.js 404 (Not Found) tripanalyzer.cloudapp.net/:114
GET http://tripanalyzer.cloudapp.net:1337/js/sails.io.js 404 (Not Found) tripanalyzer.cloudapp.net/:114
GET http://tripanalyzer.cloudapp.net:1337/js/app.js 404 (Not Found)
Why? My node_modules are well installed, sails is running, so why it didn't find the .js files? I working on it, but if you have any solution...
Ah, maybe it's because I'm developping under windows 7 and the server is ubuntu 13.04, I transfert the source code via git.
The .tmp directory is not generated when I run sails lift...
That might be a permissions issue. Try making a .tmp directory with 777 permissions.
Though it is more likely a firewall issue of some sort if it is having issues downloading the boilerplate source. Have you tried uploading the files downloaded from your computer (except the node_modules - just run npm install
in the sails root)
Have you tried running in verbose
logging mode? You can change the log level in config/log.js
from the default of info
.
Has this been resolved?
error: Server doesn't seem to be starting. error: Perhaps something else is already running on port 80?
but it gives blank page
nothing comes
again i try http://localhost/user/create?name=harekrishna
don't use the port 80 if you are on a normal computer. Prefer another port. (8080, 1337, 5000, ...)
2014-01-31 jigneshnavsoft notifications@github.com
error: Server doesn't seem to be starting. error: Perhaps something else is already running on port 80?
but it gives blank page
nothing comes
again i try http://localhost/user/create?name=harekrishna
— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/921#issuecomment-33770711 .
Cordialement,
M. Ambroise Dhenain.
i want to access url like this http://localhost not any port
how to do that??
The error is useful, you have another program running on this port. Skype is running on :80 for example.
2014-01-31 jigneshnavsoft notifications@github.com
i want to access url like this http://localhost not any port
how to do that??
— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/921#issuecomment-33771313 .
Cordialement,
M. Ambroise Dhenain.
But, as programmer, I advice you to don't use the port 80, you'll get errors like this and lost your time. Use another port for development and use the port 80 with production on a dedicated server. It's what programmers do usually.
2014-01-31 Ambroise Dhenain ambroise.dhenain@gmail.com
The error is useful, you have another program running on this port. Skype is running on :80 for example.
2014-01-31 jigneshnavsoft notifications@github.com
i want to access url like this http://localhost not any port
how to do that??
— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/921#issuecomment-33771313 .
Cordialement,
M. Ambroise Dhenain.
Cordialement,
M. Ambroise Dhenain.
Not Found
Apache/2.2.15 (CentOS) Server at localhost Port 80
i close skype but same result nothing comes
On Fri, Jan 31, 2014 at 9:20 AM, Vadorequest notifications@github.comwrote:
The error is useful, you have another program running on this port. Skype is running on :80 for example.
2014-01-31 jigneshnavsoft notifications@github.com
i want to access url like this http://localhost not any port
how to do that??
Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/921#issuecomment-33771313> .
Cordialement,
M. Ambroise Dhenain.
Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/921#issuecomment-33771452 .
which files i need to chnage the code... for port number changes
On Fri, Jan 31, 2014 at 9:22 AM, Jignesh Jigs ec.jignesh@gmail.com wrote:
Not Found
The requested URL /user/create was not found on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80
i close skype but same result nothing comes
On Fri, Jan 31, 2014 at 9:20 AM, Vadorequest notifications@github.comwrote:
The error is useful, you have another program running on this port. Skype is running on :80 for example.
2014-01-31 jigneshnavsoft notifications@github.com
i want to access url like this http://localhost not any port
how to do that??
Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/921#issuecomment-33771313> .
Cordialement,
M. Ambroise Dhenain.
Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/921#issuecomment-33771452 .
/config/local.js
2014-01-31 jigneshnavsoft notifications@github.com:
which files i need to chnage the code... for port number changes
On Fri, Jan 31, 2014 at 9:22 AM, Jignesh Jigs ec.jignesh@gmail.com wrote:
Not Found
The requested URL /user/create was not found on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80
i close skype but same result nothing comes
On Fri, Jan 31, 2014 at 9:20 AM, Vadorequest <notifications@github.com wrote:
The error is useful, you have another program running on this port. Skype is running on :80 for example.
2014-01-31 jigneshnavsoft notifications@github.com
i want to access url like this http://localhost not any port
how to do that??
Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/921#issuecomment-33771313> .
Cordialement,
M. Ambroise Dhenain.
Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/921#issuecomment-33771452> .
— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/921#issuecomment-33771708 .
Cordialement,
M. Ambroise Dhenain.
by the way, you could also run sails lift --port 8080 for instance. But I prefer use the config file.
2014-01-31 Ambroise Dhenain ambroise.dhenain@gmail.com:
/config/local.js
2014-01-31 jigneshnavsoft notifications@github.com:
which files i need to chnage the code... for port number changes
On Fri, Jan 31, 2014 at 9:22 AM, Jignesh Jigs ec.jignesh@gmail.com wrote:
Not Found
The requested URL /user/create was not found on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80
i close skype but same result nothing comes
On Fri, Jan 31, 2014 at 9:20 AM, Vadorequest <notifications@github.com wrote:
The error is useful, you have another program running on this port. Skype is running on :80 for example.
2014-01-31 jigneshnavsoft notifications@github.com
i want to access url like this http://localhost not any port
how to do that??
Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/921#issuecomment-33771313> .
Cordialement,
M. Ambroise Dhenain.
Reply to this email directly or view it on GitHub< https://github.com/balderdashy/sails/issues/921#issuecomment-33771452> .
— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/sails/issues/921#issuecomment-33771708 .
Cordialement,
M. Ambroise Dhenain.
Cordialement,
M. Ambroise Dhenain.
it works for me http://localhost:8080/ but not working http://localhost
Same problem with me on Ubuntu 14.04, I added nodejs at first line. It worked.
@vaibhavmule @jigneshnavsoft If you are not root user, Then you can not use port below 1024, Try out higher than 1024 or login as root user.
Hi.
I'm using Windows Azure for host my website for a school project. I have a VM with ubuntu 13.04 installed.
I installed a lot of things, because the VM was almost empty. nodejs works well, no problem. But when I run this:
there is ... nothing appens:
the sails command is founded (because no error, but don't works. I used
So, do you have any idea? I work on windows usually. And, it's crazy but... When I do:
That works! And at the url: http://tripanalyzer.cloudapp.net/ (i don't know if it will be available when you will watch it but...) My page is good ! Except these error:
In the javascript console, obviously, so that don't works really because sails don't generate the .temp because he's not running.
Thank you for your time.
Details of the sails install here: