11
9

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.

エラー文まとめ(vue.js、firebase、rails、yarn)

Last updated at Posted at 2018-01-07

vue.js周り

rails周り

NameError - uninitialized constant Object::Something

モデルの名前を単数形にしていないときに出たエラー

Your Yarn packages are out of date!

========================================
  Your Yarn packages are out of date!
  Please run `yarn install` to update.
========================================


To disable this check, please add `config.webpacker.check_yarn_integrity = false`
to your Rails development config file (config/environments/development.rb).


yarn check v1.3.2
error Lockfile does not contain pattern: "firebase@^4.8.1"
error Lockfile does not contain pattern: "vuefire@^1.4.5"
error Found 2 errors.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
  • webpack
  • vue.js
  • yarn

この構成で開発していたら上記のエラーが出た。意味はyarnの中のパッケージに古いものがあるとのこと。

yarn install

でパッケージをインストールして

ここにあるようにconfig/environment/development.rbに下記追加で解決

config.webpacker.check_yarn_integrity = false

You are using the runtime-only build of Vue where the template compiler is not available.

vue.runtime.esm.js:574 [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

(found in <Root>)

ここにまとめているように完全ビルドにしてねというエラー。

import Vue from 'vue/dist/vue.esm';

を冒頭に入れて解決。

ActiveModel::UnknownAttributeError (unknown attribute 'sns_id' for Post.):

sns_idというattributeが不明というもの。このケースではrails db:migrateがうまくいってなくてカラムが追加できていなくてactive recordにsns_idが追記されていなかったのが原因だった。rails db:migrateをやり直したら直った。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?