LoginSignup
3
0

More than 5 years have passed since last update.

Module build failed: TypeError: fileSystem.statSync is not a function

Last updated at Posted at 2017-09-24
ERROR in ../~/react/react.js
Module build failed: TypeError: fileSystem.statSync is not a function
    at module.exports (..\node_modules\babel-loader\lib\utils\exists.js:7:25)
    at find (..\node_modules\babel-loader\lib\resolve-rc.js:13:9)
    at Object.module.exports (..\node_modules\babel-loader\lib\index.js:113:132)
 @ multi vendor

というエラーが消せない
http://otiai10.hatenablog.com/entry/2016/04/17/211145
https://stackoverflow.com/questions/32832179/using-webpack-with-nodejs-native-modules

こちらの記事を読むと、解消したみたいだけどおいらは全然ダメww

https://github.com/babel/babel-loader/issues/505
元々は、こっちの記事だったと思っているので、なぜか消えない

で、勝手にコードを書き換えて逃げているww

babel-loader/lib/index.js
  // Handle options
  var loaderOptions = loaderUtils.getOptions(this) || {};
  var fileSystem = this.fs ? this.fs : fs;
  fileSystem = fs;  <-- これ入れて逃げた
  var babelrcPath = null;
  if (loaderOptions.babelrc !== false) {

-- 2019/03/26 追記 --
バグの理由を見つけたんだけど...あれ?忘れちゃったなー
client or server(nodejs)どちらか利用できないケースで利用しているのが理由だったような気がする

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