New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
express js fail, after npm start #31
Comments
just type |
I did type |
@szmarci what is the output for the following command: |
it's |
It shouldn't. I asked because the error you posed says that when |
well, node works just fine. do you have any idea what else can I try? |
I have no idea, I'm sorry. It may be worth asking on |
I will try to reinstall everything, node, npm, express and I'll come back with the result. |
so I did reinstall everything, node, npm, express, etc... and for some strange reason it seems it is now working. after
after there is a spinning backslash and |
ok, i'm going to close this issue.
the node.js 0.10.29 comes with a broken npm in this regard; if you don't want to see that spinner you'll have to upgrade your npm. |
"I will try to reinstall everything, node, npm, express and I'll come back with the result." @szmarci |
:) |
I encountered this issue and finally get it solved by running the following command:
source: Vigrond |
@renfeisong thank you. Indeed, I had the same issue and was due to a missing installation of Compass. Just running Thanks! |
I'm running Node.js on windows 8, and when I'm encountering the same/similar issue. I follow these steps and it works perfectly until Iry :
This is my app.js where the 'use' function is being called: var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var users = require('./routes/users');
/// catch 404 and forwarding to error handler
app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});
/// error handlers
// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
app.use(function(err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: err
});
});
}
var app = express();
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
//
app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded());
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use('/', routes);
app.use('/users', users);
// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {}
});
}); I'm just getting 'into cmd'' and really enjoy it, so sorry if my syntax/phrasing or anything makes this impossible to sort through in order to give advice (this is my first post to github). |
@ADC5 you need to put the line |
@dougwilson Thanks for that doug! But when I call npm start it gives me another set of errors:
And then the rest of the ERR! statements are the same. Any other ideas? Also, is there a way to copy the text from node.js so I don't have to type it completely out each time? Thanks again for the help! |
@ADC5 it's because you do not have a file at |
I tried that and it gave me: |
Sorry, accidently sent that while I was finishing it. Could that mean I have a server connection issue> |
and I forgot the @dougwilson : 2 previous posts |
@ADC5 I'm happy to help more, but please, let's stop filling the dozen people in this old thread's email inboxes. Please create a new issue here: https://github.com/expressjs/generator/issues/new |
Hi,
I tried to run the generator, but run into some errors.
(I'm on OS X 10.9.2, node, npm, express, everything is the latest)
There are no problems until
npm start
I get this in the prompt:Then I visit
http://localhost:3000/
, I get the Express test page (but unstyled) and immediately after this in the terminal:I couldn't find any solution with google, tried to sudo, change port, etc.. but no luck.
The text was updated successfully, but these errors were encountered: