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

Let'sChat構築時のnpm installのエラーに悩まされた話

More than 3 years have passed since last update.

色々できるチャットが欲しいということで、本当はSlackが良いのですが、セキュリティ的に難しい面もある為、評価用にLet's Chatを構築してみました。

環境は、AWS EC2 Redhat を選択しました。

色々インストールしつつ、いざLet's Chatをインストールしようとしましたが、

# git clone https://github.com/sdelements/lets-chat.git
# cd lets-chat
# npm install

ここで下記エラーが発生。。

> typechecker@2.0.8 preinstall /home/ec2-user/lets-chat/node_modules/i18n/node_modules/messageformat/node_modules/watchr/node_modules/extendr/node_modules/typechecker
> node ./cyclic.js

sh: node: command not found

> typechecker@2.0.8 preinstall /home/ec2-user/lets-chat/node_modules/i18n/node_modules/messageformat/node_modules/watchr/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js

sh: node: command not found
npm ERR! Linux 3.10.0-514.el7.x86_64
npm ERR! argv "/root/.nodebrew/current/bin/node" "/root/.nodebrew/current/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! typechecker@2.0.8 preinstall: `node ./cyclic.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the typechecker@2.0.8 preinstall script 'node ./cyclic.js'.
npm ERR! This is most likely a problem with the typechecker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./cyclic.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls typechecker
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ec2-user/lets-chat/npm-debug.log

色々調べた挙句、node.jsのバージョンを上げたらうまくいきました。
※まだ、 node.jsnpm 周りがよくわかってません。

# nodebrew install-binary v7.10.0
Fetching: https://nodejs.org/dist/v7.10.0/node-v7.10.0-linux-x64.tar.gz
######################################################################## 100.0%
Installed successfully
# nodebrew use v7.10.0
use v7.10.0

主に下記サイトを参考にさせて頂きました。
How to Deploy a Let's Chat Server on CentOS 7

ShoNagai
Software Engineer at Gaudiy inc.
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