bldg14 / eventual

A simple event calendar
https://eventual-client.fly.dev
MIT License
0 stars 0 forks source link

SyntaxError message in console #46

Closed eduenez33 closed 10 months ago

eduenez33 commented 10 months ago

Issue Description

When loading the client at https://eventual-client.fly.dev/, we should be able to see an array of items in the console. Instead we are met with an error message.

SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON

This file is where the bug is occurring

Supporting Documentation

No response

Implementation Details

TBD

Acceptance Criteria

Array of items should be visible in the console and the error should go away.

kevinfalting commented 10 months ago

It turns out that the dockerfile I wrote doesn't use the build arg appropriately. According to the docs:

An ARG instruction goes out of scope at the end of the build stage where it was defined.

And the backend url build arg in Dockerfile.client is defined before the first build stage even begins. Moving this line inside of the first build stage will solve this problem.

There's actually an additional problem that needs to be looked into, and that is the dockerfile is failing to build locally, specifically at the npm run build step.

kevinfalting commented 10 months ago

This bug was introduced in https://github.com/bldg14/eventual/pull/44

kevinfalting commented 10 months ago

There's actually an additional problem that needs to be looked into, and that is the dockerfile is failing to build locally, specifically at the npm run build step.

I've tried building it on another computer and the fly.io builder, it worked fine. There must be something off about my personal computer. This doesn't seem to be a bug with the project.