皆様質問がございますのでよろしくお願いします。
現在 Get Started: Chat application (http://socket.io/get-started/chat/)を
Node.jsがサーバー側で動くJavaScriptプラットホーム!!と聞いて面白そうだ!!と思いやっています。
(正直すごい楽しいです!!データを投げてる感じが面白いです。違うかな?)
すみません、質問を続けます。
####質問
チュートリアル上で、フレームワークである「Express」はインストールできました。
npm install --save express@4.10.2
が、なぜか途中から何もしていないはずなのに、npmインストールができなくなりました
$ npm install --save socket.io -bash: npm: command not found
これをnpm installにしても変化がありませんでした。
$ npm install -bash: npm: command not found
なので、この「npmインストールができない」という問題を一緒に考えてもらえるとすごく嬉しいです。
わかりづらい質問ですが、よろしくお願いします!
#####不明な点
理由は不明ですが、このような結果にもなります。
なんでnode.jsはあるんだろう。npmで入れたというのに。
$ npm -v -bash: npm: command not found $ node -v v4.4.5 $ which node /usr/local/bin/node
####Githubでの確認
Githubで見る限りmacの場合はNodeを入れればそれについていくると書いています。
が、存在しないと言われている。という状態です
なのでgit cloneをしてみました
$ git clone https://github.com/npm/npm.git
結果
git clone https://github.com/npm/npm.git Cloning into 'npm'... remote: Counting objects: 56932, done. remote: Compressing objects: 100% (2/2), done. remote: Total 56932 (delta 1), reused 0 (delta 0), pack-reused 56930 Receiving objects: 100% (56932/56932), 30.53 MiB | 598.00 KiB/s, done. Resolving deltas: 100% (30871/30871), done. Checking connectivity... done. .... $ npm -v -bash: npm: command not found
だめでした。次はどうしようかな。
####似た現象を発見!!
「Mac OS X NPM install probem "-bash : npm: command not found"」
https://github.com/npm/npm/issues/3125
####で、以下の改善策を発見
$ brew update $ brew uninstall node $ brew install node $ sudo brew postinstall node
####改善せず、、、が、これかなという改善策を発見
Error: The `brew link` step did not complete successfully それで already exists. You may want to remove it: をしろと言われる。
####改善せず、次の課題を発見
Warning: The post-install step did not complete successfully You can try again using `brew postinstall node`
どうやら「リンク」ができていないから、「node」は呼び出せても、「npm」が呼び出せない
よという結果になるとのこと。
Warning: node-6.2.1 already installed, it's just not linked
nodeはあるけど、「brew postinstall node」しないと、リンクできんぜ!ということ。
だから、npmできんぜ!ということ。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。