haxxnz / vaxxed-as-web

6 stars 2 forks source link

Can't run `yarn gatsby:develop` #14

Closed noway closed 2 years ago

noway commented 2 years ago

I've just removed node_modules/ folder and run yarn.

I have

GATSBY_TRUSTED_ISSUER=did:web:nzcp.covid19.health.nz

in .env.development

I'm trying to run yarn gatsby:develop and it fails:

yarn gatsby:clean && yarn gatsby:develop

yarn run v1.22.10
$ gatsby clean
info Deleting .cache, public, /Users/ilia/compiling/vaxxed-as-web/node_modules/.cache/babel-loader, /Users/ilia/compiling/vaxxed-as-web/node_modules/.cache/terser-webpack-plugin
info Successfully deleted directories

✨  Done in 0.75s.
yarn run v1.22.10
$ gatsby develop -H 0.0.0.0 -p 8000 -o
info The following flags are active:
- FAST_DEV · Enable all experiments aimed at improving develop server start time.

success open and validate gatsby-configs, load plugins - 0.441s
success onPreInit - 0.004s
success initialize cache - 0.037s
success copy gatsby files - 0.039s
success Compiling Gatsby Functions - 0.119s
success onPreBootstrap - 0.132s
success createSchemaCustomization - 0.001s
success gatsby-plugin-react-i18next: create node: zh-hk/translation - 0.118s
success gatsby-plugin-react-i18next: create node: zh-cn/translation - 0.076s
success gatsby-plugin-react-i18next: create node: ru/translation - 0.082s
success gatsby-plugin-react-i18next: create node: sm/translation - 0.132s
success gatsby-plugin-react-i18next: create node: nl/translation - 0.134s
success gatsby-plugin-react-i18next: create node: mi/translation - 0.134s
success gatsby-plugin-react-i18next: create node: hi/translation - 0.160s
success gatsby-plugin-react-i18next: create node: es/translation - 0.161s
success gatsby-plugin-react-i18next: create node: en/translation - 0.159s
success gatsby-plugin-react-i18next: create node: de/translation - 0.157s
success gatsby-plugin-react-i18next: create node: fa/translation - 0.152s
success gatsby-plugin-react-i18next: create node: ar/translation - 0.153s
success Checking for changed pages - 0.001s
success source and transform nodes - 0.479s
success building schema - 0.356s
success createPages - 0.002s
success createPagesStatefully - 0.165s
info Total nodes: 130, SitePage nodes: 48 (use --verbose for breakdown)
success Checking for changed pages - 0.000s
success write out redirect data - 0.001s
success Build manifest and related icons - 0.551s
success onPostBootstrap - 0.559s
info bootstrap finished - 3.415s

success onPreExtractQueries - 0.000s
success extract queries from components - 0.282s
success write out requires - 0.007s
success run page queries - 0.014s - 3/3 207.69/s
not finished Building development bundle - 5.831s

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there a workaround?

noway commented 2 years ago

@rafcontreras any chance you can clone a clean copy of the repo and try running it? I wonder if it's because some needed files are not checked in in git?

noway commented 2 years ago

Do I need to run yarn localazy:download first? What is $LOCALAZY_READ_KEY?

rafcontreras commented 2 years ago

@noway the translations are there, no need to download them.

I did a clean clone in a separate directory, installed, and ran yarn gatsby:develop. I had no issues.

I'm using Node 14.8.1 as Gatsby supports Node 14^ . Maybe that's the reason?

git clone git@github.com:vaxxnz/vaxxed-as-web.git
cd vaxxed-as-web
yarn
yarn Gatsby:develop

I didn't even create a .env.development file

noway commented 2 years ago

@rafcontreras sorry, i figured it out. apparently it's because of my changes - i did some changes, committed them, then tried to run the repo but typescript compile was failing. I wish gatsby would show me typescript error, but it didn't.

No worries, it works fine now that i rolled back.