reactで時間を使うパッケージでreact-momentというものがるのですが
webpack4.5のバージョンをあげたら動かなくなった
ERROR in ./node_modules/react-moment/dist/index.js Module not found: Error: Can't resolve 'moment' in 'C:\git\xxxxsystem\node_modules\react-moment\dist' @ ./node_modules/react-moment/dist/index.js 1:82-99 @ ./src/components/App.jsx @ ./src/index.jsx @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.jsx
無視するプラグインとかいれたしたのですが
解消されませんでした
webpack.config
new webpack.IgnorePlugin(/\.\/locale$/), new webpack.ContextReplacementPlugin(/\.\/locale$/, 'empty-module', false, /js$/) |<< 結局、たどり着いたのがissuesで・・・ https://github.com/gpbl/react-day-picker/issues/505 >|| npm add moment # + moment@2.22.0 # added 1 package from 6 contributors in 22.765s
をおこなったら解決した
助かったけど、バージョンアップで意味のわからん所で
エラーになるのは勘弁してほしい
React入門 React・Reduxの導入からサーバサイドレンダリングによるUXの向上まで (NEXT ONE)
- 作者: 穴井宏幸,石井直矢,柴田和祈,三宮肇
- 出版社/メーカー: 翔泳社
- 発売日: 2018/02/19
- メディア: 単行本(ソフトカバー)
- この商品を含むブログを見る