Express: About `npm install express` in Readme.md

Created on 11 Sep 2019  路  9Comments  路  Source: expressjs/express

If you follow the readme procedure, the following error will occur in the first npm install express.

saveError ENOENT: no such file or directory, open '/xxx/xxx/package.json'

As you know, the cause is package.json does not exist.
Other users seem to have a similar error, so it seems better to add npm init to the readme.
Or I thought it would be nice to bring a link Please follow the installation guide for details before npm install express.

discuss docs enhancement good first contribution

Most helpful comment

I agree with that whole statement as well.

All 9 comments

Hi @yanokenken, thanks for taking the time to open an issue. Normally I would say that "how a user starts their project setup" is out of scope for a README.md, and that the existence of a package.json is a precondition to any node work. Express has a unique position in the node ecosystem as a common "first exposure" module. Because so many of our users are first timers I actually think adding a section which says "If this is a brand new project, make sure to create a package.json first (suggestion: $ npm init)" is a good idea.

I agree with that whole statement as well.

Thank you for reading!
And thank you for the detailed explanation.

"If this is a brand new project, make sure to create a package.json first (suggestion: $ npm init)"

It's a very good idea.
Many beginners are saved.

@yanokenken sounds like you have enough to open a PR 馃槈, we can close this once the PR is up.

@wesleytodd
Oh I see! I'll try PR.
Thank you for guiding me very kindly.

What's the status is it still Open!!

hi guys, i was readin all messages and i think that normally they forget because of not understanding the reason why its important. All dependences will be registered there, not only to because is important know what are the tools needed to run a specific application, but we need to understand that to deploy your App, normally servers that support node.js dont emigrate the files or dependences, they look into your package.json and they install the dependences in their environment. So, before install a dependence, make sure to use also --save (eg. npm install express --save).

fixed in #4168

Thanks for the support.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HafidAbnaou picture HafidAbnaou  路  3Comments

ER-GAIBI picture ER-GAIBI  路  3Comments

despairblue picture despairblue  路  3Comments

Domiii picture Domiii  路  3Comments

jefflage picture jefflage  路  4Comments