9
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Node.js:[Don't know how to build task 'db:']の対処方法

Last updated at Posted at 2018-06-01

はじめに

かなり初歩的なエラーかと思いますが、私が初心者のため備忘録を含め記録として残したいと思います。

結論:【rails db: migrate】ではなく、【rails db:migrate】を実行する。

ターミナルで`$ rails db: migrateと入力した際に以下のエラーが返ってきました。

ターミナル
Error: Cannot find module 'ejs'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous>
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

nmp initを実行後npm install -save ejsを実行することで解決。

solved
1) npm init 質問に関しては全てエンターキーを押下
2) npm install -save ejs

参考文献:Node.js超入門 (著) 掌田津耶乃様

ご参考になれば幸いです。

9
4
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
9
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?