質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Hubot

HubotはGitHub社が開発したチャットbotのフレームワークです。

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

Q&A

0回答

1238閲覧

ENOENT: no such file or directory エラー

退会済みユーザー

退会済みユーザー

総合スコア0

Hubot

HubotはGitHub社が開発したチャットbotのフレームワークです。

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

0グッド

0クリップ

投稿2020/12/10 09:50

centOS7上で
$[vagrant@localhost hubot-study] yo hubot --owner="OWNER <owner@example.com>" --name="TestBot" --description="Test Bot" --adapter=slack(ownerは自分のメールアドレス)
を打ったところ、以下の結果となりました。
ディレクトリ以下に既にpackage.jsonが存在するのに、別のpackage.jsonがないというエラーになっているのか、また、この場合どうすれば解決ができるのか教えていただけないでしょうか。

bash

1 _____________________________ 2 / \ 3 //\ | Extracting input for | 4 ////\ _____ | self-replication process | 5 //////\ /_____\ \ / 6 ======= |[^_/\_]| /---------------------------- 7 | | _|___@@__|__ 8 +===+/ /// \_\ 9 | |_\ /// HUBOT/\ 10 |___/// / \ 11 \ / +---+ 12 \____/ | | 13 | //| +===+ 14 // |xx| 15 16identical bin/hubot 17identical bin/hubot.cmd 18identical Procfile 19identical README.md 20identical external-scripts.json 21identical hubot-scripts.json 22identical .gitignore 23 conflict package.json 24? Overwrite package.json? overwrite 25 force package.json 26identical scripts/example.coffee 27identical .editorconfig 28 _____________________________ 29 _____ / \ 30 \ \ | Self-replication process | 31 | | _____ | complete... | 32 |__\| /_____\ \ Good luck with that. / 33 |//+ |[^_/\_]| /---------------------------- 34 | | _|___@@__|__ 35 +===+/ /// \_\ 36 | |_\ /// HUBOT/\ 37 |___/// / \ 38 \ / +---+ 39 \____/ | | 40 | //| +===+ 41 // |xx| 42 43npm ERR! code ENOENT 44npm ERR! syscall open 45npm ERR! path /home/vagrant/workspace/hubot-study/node_modules/body-parser/node_modules/inherits/package.json.3319719125 46npm ERR! errno -2 47npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/workspace/hubot-study/node_modules/body-parser/node_modules/inherits/package.json.3319719125' 48npm ERR! enoent This is related to npm not being able to find a file. 49npm ERR! enoent 50 51npm ERR! A complete log of this run can be found in: 52npm ERR! /home/vagrant/.npm/_logs/2020-12-10T09_10_52_545Z-debug.log

作業中のディレクトリとその中身は以下のとおりです。

bash

1[vagrant@localhost hubot-study]$ pwd 2/home/vagrant/workspace/hubot-study 3[vagrant@localhost hubot-study]$ tree -L 1 4. 5├── Procfile 6├── README.md 7├── bin 8├── external-scripts.json 9├── hubot-scripts.json 10├── node_modules 11├── package.json 12└── scripts 13 143 directories, 5 files

/home/vagrant/workspace/hubot-study/package.jsonの中身はhubotにより生成されており、中身は以下のとおりです。

bash

1{ 2 "name": "TestBot", 3 "version": "0.0.0", 4 "private": true, 5 6 "author": "kazu <kazuit@gmail.com>", 7 8 "description": "Test Bot", 9 10 "dependencies": { 11 }, 12 13 "engines": { 14 "node": "0.10.x" 15 } 16} 17

それまでにやったことは、yoとgenerator-hubot, coffee-scriptの3つのモジュールのインストールとディレクトリの作成です。ここでは特にエラーは起きませんでした。また、ここまでの操作とyo hubotの実行は参考書通りに進めています。

bash

1[vagrant@localhost workspace]$ npm install -g yo@2.0.0 2[vagrant@localhost workspace]$ npm install -g generator-hubot 3[vagrant@localhost workspace]$ npm install -g coffee-script@1.12.7 4[vagrant@localhost workspace]$ mkdir hubot-study 5[vagrant@localhost workspace]$ cd hubot-study

以下環境です。
macOS Catalina ver10.15.7
Vagrant 2.2.7
VirtualBox 6.1.14
Node.js v14.15.1
npm 6.14.8

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問