fabien0102 / gatsby-starter

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

yarn build fail on clean install #58

Closed mulyoved closed 5 years ago

mulyoved commented 6 years ago
gatsby new my-website https://github.com/fabien0102/gatsby-starter
yarn add --dev babel-loader@7.1.1
yarn build

Faild with TS errors,
4-18-2018 11-07-29 am

Set noImplicitAny = false also does not help as fail due to other errors

tsc --version
2.5.3
fabien0102 commented 6 years ago

And with npm instead of yarn? (we have some weird packages conflicts between gatsby and storybook with yarn…)

mulyoved commented 6 years ago
rm -rf node_modules/
npm install
npm build

also fail

fabien0102 commented 6 years ago

@mulyoved Sorry for this, I need to investigate a little bit more to understand what happen and find a solution. You can also try to just clone this repo (without the gatsby-cli) and rm -rf .git if it's working. Let me know if this solution is working for you :)

mulyoved commented 6 years ago

git clone and then yarn or npm install + build also didn't work, same failures

fabien0102 commented 6 years ago

Oki… for the record, which os and node version do you use?

mulyoved commented 6 years ago

Windows node 8.10.0

sielay commented 6 years ago

@mulyoved Had the same issues. For starters remove implicitly from tsconfig.json. Code from starter should work. Problems start when you try to add other dependencies and typescript, webpack and few other packages start to rage with an incompatible version. Over here you can find some trails and errors trying to find the issue https://github.com/fabien0102/gatsby-starter/pull/55

i001962 commented 6 years ago

Same issue here FWIW

i001962 commented 6 years ago

@mulyoved FWIW I updated node to v9.10.1 then a build from a fresh install worked as expected.

ashfurrow commented 6 years ago

I just experienced a similar error on a fresh build, with both Yarn and npm.

Here's the error log ``` npm start > gatsby-starter@1.0.0 start /Users/ash/bin/blog2/blog > gatsby develop success delete html and css files from previous builds — 0.013 s success open and validate gatsby-config — 0.005 s success copy gatsby files — 0.014 s success onPreBootstrap — 0.419 s success source and transform nodes — 0.183 s success building schema — 0.260 s success createLayouts — 0.009 s success createPages — 0.032 s success createPagesStatefully — 0.020 s success onPreExtractQueries — 0.001 s success update schema — 0.166 s success extract queries from components — 0.358 s success run graphql queries — 0.298 s success write out page data — 0.003 s success write out redirect data — 0.001 s success onPostBootstrap — 0.001 s info bootstrap finished - 3.569 s error There was an error compiling the html.js component for the development server. See our docs page on debugging HTML builds for help https://goo.gl/yL9lND Error: Module build failed: TypeError: fileSystem.statSync is not a function - exists.js:7 module.exports [blog]/[babel-loader]/lib/utils/exists.js:7:25 - resolve-rc.js:13 find [blog]/[babel-loader]/lib/resolve-rc.js:13:9 - index.js:111 Object.module.exports [blog]/[babel-loader]/lib/index.js:111:132 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! gatsby-starter@1.0.0 start: `gatsby develop` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the gatsby-starter@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/ash/.npm/_logs/2018-05-05T16_48_51_683Z-debug.log ```

I updated to use Node to 9.10.1 as suggested by @i001962 above and it now works. Thanks for the workaround! Let me know if I can help provide any other details.

fabien0102 commented 5 years ago

Should be fixed, please tell if it's still broken ;) (I'm just cleaning a bit our issues ^^)