npm can't find package.json
I think, npm init
will create your missing package.json
file. It works for me for the same case.
Update 2018
This is becoming quite a popular question and my answer (although marked as correct) is no longer valid. Please refer to Deepali's answer below:
npm init
Original Outdated Answer
I think you forgot to setup the directory for express:
express <yourdirectory>
Once you do that you should be able to see a bunch of files, you should then run the command:
npm install -d
Regards.
I'll be brief but deadly. :) install -d will not work for you. It's simple. Try
$ npm install -g express