fabien0102 / gatsby-starter

Gatsby 2.0 starter with typescript and many cools dev tools
386 stars 99 forks source link

fileSystem.statSync error #51

Open efleurine opened 6 years ago

efleurine commented 6 years ago

I just create a new project using the starter kit and I am getting this error


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

  - exists.js:7 module.exports
    [many]/[babel-loader]/lib/utils/exists.js:7:25

  - resolve-rc.js:13 find
    [many]/[babel-loader]/lib/resolve-rc.js:13:9

  - index.js:111 Object.module.exports
    [many]/[babel-loader]/lib/index.js:111:132

it seems related to https://github.com/babel/babel-loader/issues/505

efleurine commented 6 years ago

I install "babel-loader": "7.1.1" as a devDependency and the error vanished

siluri commented 6 years ago

u mean Version 6.4.1

fabien0102 commented 6 years ago

Sorry for that, I really to take some time to update this starter… I have also some pull requests that I can't merge for obscur reasons… Can you also precise your nodejs/npm version? and the real version of babel-loader (go to node_modules/babel-loader/package.json) ?

mobilecipl commented 6 years ago

@fabien0102 as i execute this command "gatsby new my-website https://github.com/fabien0102/gatsby-starter" the yarn will install dependency and in yarn.lock babel-loader is 7.1.4 . To solve this issue i remove node_module and yarn.lock and run npm install inside root folder then babel-loader 6.4.1 is comes inside node_modules as in root package.json contained.

crucialfelix commented 6 years ago

Simplest fix is this:

yarn add --dev babel-loader@7.1.1
damienstanton commented 6 years ago

Unfortunately, the above doesn't work in my case. using node 10.2.1, yarn 1.7.0 and npm 6.1.0. I am still getting fileSystem.statSync is not a function on a fresh install.

ccjjmartin commented 6 years ago

Version 6 of babel loader fixed this issue for me.