LoginSignup
0
0

More than 1 year has passed since last update.

チャットボットのhubotをインストール時のトラブル対応

Posted at

チャットボットのhubotをインストールしてみました。
インストール時にちょっとトラブったので、メモとして残しました。

参考になったサイトはこちらの記事

Hubot のインストールと Hello World

エラー発生

この手順に従って進めていくと、 $ yo code でエラーになりました。
エラーコードは以下の通り。

/usr/local/lib/node_modules/yo/node_modules/npm-registry-fetch/node_modules/@npmcli/fs/lib/fs.js:6
const fsSync = Object.fromEntries(Object.entries(fs).filter(([k, v]) =>
                      ^
TypeError: Object.fromEntries is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/npm-registry-fetch/node_modules/@npmcli/fs/lib/fs.js:6:23)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
(略)

原因と対策

ネットで調べてみると、githubのissuesに全く同じ事象についての記事がありました。

参考:
https://github.com/microsoft/vscode-generator-code/issues/343

原因としては、Node.jsのバージョンが古いためのようです。
さらに、yoが動くためにもnodeのバージョンの指定が必要のようです。

  • The latest version of the yo package supports node >=12.10.0.

この記事には、バージョンの上げ方の情報も提示してくれていました。↓
https://computingforgeeks.com/how-to-install-nodejs-on-ubuntu-debian-linux-mint/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0