Comments (12)
Can you check if there is even a bin/www
file in your directory? Can you show what the output of node -v
is?
from generator.
bin/www
is an existing file. And it runs well (like I said, the server runs successfully, it only fails after one request).
madara@Madara-PC:~/nodejs/magisite$ node -v
v0.10.25
from generator.
OK. Are you running it as ./bin/www
? Can you try running it as npm start
according to our readme? Would you also be able to paste the contents of bin/www
into this issue?
from generator.
Sure. With npm start
I get a slightly different error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
The contents of the bin/www file are:
#!/usr/bin/env node
var debug = require('debug')('magisite');
var app = require('../app');
app.set('port', process.env.PORT || 3000);
var server = app.listen(app.get('port'), function() {
debug('Express server listening on port ' + server.address().port);
});
from generator.
According to
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
you're system has an old node installed that is messing this stuff up. You'll want to make sure you are not using the nodejs
debian package and instead whatever you're supposed to be using on there (sorry, I'm not familiar with it, just that installing the system package just breaks node stuff).
from generator.
You can read more about solutions that may work for you here: http://stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu
from generator.
How would you explain node -v
displaying the latest version of node then...? Also, other applications work just fine for me.
from generator.
On the same reasoning, can you you explain that warning? So far everyone that has reported the spawn ENOENT
has either had the issue I explained to you or just completely reinstalled all their node.js stuff and then it worked.
If you do find the solution, though, please let us know so we can better help people who encounter it.
from generator.
Can you at least just try to sudo apt-get install nodejs-legacy
from the StackOverflow link and see if it fixes the issue?
from generator.
I have tried. As well as the symbolic link solution after that one didn't work. Nothing :(
from generator.
Gotcha. Yea, I have no idea. Everyone who has reported this has only given vague solutions, so I really don't know what the solution is, besides that it works for thousands of people per day. Maybe start by slowing stripping down the contents of app.js
until it starts working, to see if there is something in there causing it?
from generator.
Just disregard npm
warning, those guys want us to rename "node" to "nodejs" for no good reason.
If you want to debug it further,
which node ; ls -l `which node`
... will help a bit. Here is what my debian shows:
lrwxrwxrwx 1 root root 6 Mar 27 12:19 /usr/bin/node -> nodejs
If you want it "just work", I think node ./bin/www
will do the job fine.
PS: works for me
from generator.
Related Issues (20)
- tanks
- Opinionless, minimalist variant HOT 4
- Should the node version < 6 be opted out in travis.yml ? HOT 3
- bash: express: command not found... HOT 3
- fix lodash vulnerability HOT 2
- is this still maintaining? HOT 1
- CORS HOT 1
- Include .gitignore file as part of the initial project setup HOT 1
- myapp HOT 1
- Instructions on how to compile the css engines HOT 4
- option to generate mjs HOT 1
- Recommending nodemon instead of npm start.
- Sass Generator not working out of the box HOT 1
- To bump `pug` to latest >3.x.x
- To automate maintenance of dependency versions in `express-cli.js` HOT 3
- EACCES: permission denied HOT 1
- Dire need for a major update/overhaul HOT 5
- Is express-generator is deprecated or out of maintenance? HOT 1
- Running tests locally fails
- sass instead of node-sass
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator.