minvws / nl-covid19-data-dashboard

The dashboard provides information on the outbreak and prevalence of COVID-19 in The Netherlands
https://coronadashboard.rijksoverheid.nl/
European Union Public License 1.2
174 stars 45 forks source link

Difficulty getting local environment set up due to Sanity integration #2236

Closed mpboom closed 2 years ago

mpboom commented 3 years ago

Describe the bug, issue or concern

While trying to follow the README to set up the application locally, I ran into some issues. The yarn download command didn't seem to work properly, for which I opened #2235, but I also had some difficulties with what seem to be the integration with Sanity. If any workaround is available, it would be good to mention it in the README.

To Reproduce

Steps to reproduce the behavior:

  1. Clone the repository
  2. Change directory to packages/app/
  3. Run yarn
  4. Run yarn download (with fix in #2235 applied)
  5. Run yarn dev
  6. Get greeted with error messages

Expected behavior

I expect this to work and start the development server without any errors.

Logs

My .env.local is exactly the same as the .env.local.example, I only updated the NEXT_PUBLIC_LOCALE. I also tried changing NEXT_PUBLIC_SANITY_PROJECT_ID to something random, but to no avail. This just raises errors in different places (when it actually tries to fetch data).

Not that I think it'll help that much, but here is the log: https://gist.github.com/mpboom/6c324a7aaf933715c019094a4f179e94

Additional context

I believe the issue is here that the local environment doesn't seem to function if you don't enter correct credentials for Sanity. To work on the vaccine page, I applied the following changes so no Sanity-related requests are fired: https://github.com/mpboom/nl-covid19-data-dashboard/commit/88c2cabf8cb751d43093dc09e3b1f6d03dc0d510 But that, of course, is a very limited and cubersome workaround.

Governance

VWSCoronaDashboard7 commented 3 years ago

Hi, we're aware of this issue and have discussed a few possible workarounds. Will update this ticket once there's news on that.

VWSCoronaDashboard7 commented 2 years ago

This shouldn't be an issue anymore.

mpboom commented 2 years ago

Thanks, improving this allows for others to contribute, too. Sadly, getting a local server running doesn't work out of the box just yet. I opened #3799 to fix the remaining issues.