0
0

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 3 years have passed since last update.

Uncaught Error: Cannot find module 'bootstrap-form'と出た場合はコメントアウト

Posted at

自分用忘備録

環境

  • macOS Catalina
  • ruby 2.6.6
  • Rails 6.0.3.2
  • gem 'bootstrap_form'
  • Google chrome

管理者一覧画面から管理者を削除
すると以下のエラーがブラウザ上に出現。

Unknown action
The action 'show' could not be found for Administrator::AdminsController

と出る。
destroy actionのはずが何故show??

controller,view,pathの確認をするも異常なし。

web developer consoleでerror logを確認すると、

Uncaught Error: Cannot find module 'bootstrap-form'
    at webpackMissingModule (application.js:1)
    at Module../app/javascript/packs/application.js (application.js:1)
    at __webpack_require__ (bootstrap:19)
    at bootstrap:83
    at bootstrap:83

bootstrap-formのmoduleでエラーが発生していることを確認。

app/javascript/packs/application.jsの
import 'bootstrap-form';
をコメントアウト。

動作確認すると無事削除出来た。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?