LoginSignup
1
0

More than 5 years have passed since last update.

[React]`This can lead to unexpected behavior when compiling on a filesystem with other case-semantic`という警告が出た時 

Last updated at Posted at 2017-06-20

エラー回避用の備忘録

W
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:

* /Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules/babel-loader/lib/index.js??ref--1!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules/b
abel-loader/lib/index.js??ref--4!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/app/javascript/assets/components/util/MstSelect.js
    Used by 1 module(s), i. e.
    /Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules/babel-loader/lib/index.js??ref--1!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules
/babel-loader/lib/index.js??ref--4!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/app/javascript/assets/components/pages/RollCalls/beforeDrive/selectDriverStep.j
s
* /Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules/babel-loader/lib/index.js??ref--1!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules/b
abel-loader/lib/index.js??ref--4!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/app/javascript/assets/components/util/mstSelect.js
    Used by 2 module(s), i. e.
    /Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules/babel-loader/lib/index.js??ref--1!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/node_modules
/babel-loader/lib/index.js??ref--4!/Users/nmatsumoto4/Documents/rails/workspace/sampleApp/app/javascript/assets/components/pages/DispachTrucks/addEdit/filterTrucksStep.j
s

これはimportする時に、同じコンポーネントを違う形式でimportするとなる。
この場合は、
selectDriverStep.jsではMstSelect

selectDriverStep.js
import MstSelect from '~/components/util/MstSelect.js'

js:filterTrucksStep.jsではmstSelect

filterTrucksStep.js
import MstSelect from '~/components/util/mstSelect.js'

と読んでおり、同じファイルを異なる識別子で呼んでいる。という警告である。
どちらかに識別子を揃えれば治る。
ちゃんと警告内容見ればわかる内容でした。
(ぐぐるだけじゃダメですね。)

1
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
1
0