Help us understand the problem. What is going on with this article?

macのローカルにexpressインストールしようとしてハマった

More than 5 years have passed since last update.
$ npm install -g express

でインストールした後に~/.nvm/v0.10.29/lib/node_modulesにはしっかり入っているのにbash: express: command not foundと出て迷走してしまった備忘録。

express 4系ではexpress-generatorを入れないといけない模様。

$ npm install -g express-generator

で問題なく動くようになりました。

$ express myapp
$ cd myapp && npm install
$ DEBUG=myapp ./bin/www
$ open http://localhost:3000

でExpressの画面が出ればひとまず準備完了。

ポートを変える場合は起動する前に下記のように指定してから起動。

export PORT=3001

via: http://stackoverflow.com/questions/23002448/express-command-not-found/23003386#23003386?newreg=e0a4aad84b844532b5c1488c84bfc17a

deconcepter
Webサイト制作・プロデュース、制作手法セミナー・講義、技術記事執筆等のご依頼は下記からどうぞ http://t.co/Onhc2SO6Jm 土日はWebの学校クスールでJavaScript/PHP/ActionScriptを教えています。 講座の開催お気軽にご相談ください。 http://cshool.jp/
http://log.deconcepter.jp
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした