Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn build fail on clean install #58

Closed
mulyoved opened this issue Apr 18, 2018 · 11 comments
Closed

yarn build fail on clean install #58

mulyoved opened this issue Apr 18, 2018 · 11 comments

Comments

@mulyoved
Copy link

mulyoved commented Apr 18, 2018

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
Copy link
Owner

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

@mulyoved
Copy link
Author

rm -rf node_modules/
npm install
npm build

also fail

@fabien0102
Copy link
Owner

@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
Copy link
Author

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

@fabien0102
Copy link
Owner

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

@mulyoved
Copy link
Author

Windows
node 8.10.0

@sielay
Copy link
Collaborator

sielay commented Apr 18, 2018

@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 #55

@i001962
Copy link
Collaborator

i001962 commented Apr 20, 2018

Same issue here FWIW

@i001962
Copy link
Collaborator

i001962 commented Apr 23, 2018

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

@ashfurrow
Copy link

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants