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

MiniOxygen encountered an error while running your app's entry point #2366

Open
Emmanuel-1002 opened this issue Jul 25, 2024 · 7 comments
Open
Labels
Bug Something isn't working SEV-3

Comments

@Emmanuel-1002
Copy link

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

latest from npm

What version of Remix are you using?

No response

Steps to Reproduce

npm create @shopify/hydrogen@latest
Javascript
NPM yes
Tailwind

Then:
h2 upgrade

Then:
npm run dev

Expected Behavior

Should open page with front

Actual Behavior

error
│ │
│ MiniOxygen encountered an error while running your app's entry point: │
│ │
│ SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

NPM version: v10.8.2
Node version: v20.16.0

@rogerogers
Copy link

rogerogers commented Jul 27, 2024

The issue might be that port 3000 on your local machine is being used by another program, such as Grafana. This is what happened in my case.

@NicolasTMS
Copy link

The issue might be that port 3000 on your local machine is being used by another program, such as Grafana. This is what happened in my case.

I don't have anything else running. One week ago I got this error only sometimes. But since that I always got this error. So impossible to run application in "Dev" mode

@Emmanuel-1002
Copy link
Author

It was the PORT 3000 that was already used ! Thanks :)
Will be nice to add different port on the ENV / also say in the console if we would like to open using another port (like npm run dev on react project)

@frandiox
Copy link
Contributor

The dev server should already start in a different port if 3000 is in use. However, there might be a bug in the way MiniOxygen communicates with the Vite server when there are more than 1 Vite servers up (e.g. 3000 and 3001). Leaving this open for now while we try to reproduce it.

@rieger-jared
Copy link

what's the status on this bug? I'm following this getting started guide https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started# and I'm failing with this error on step 2.

Doesn't seem to bode well for a framework if the getting started workflow doesn't work.

@Emmanuel-1002
Copy link
Author

Make sure you port 3000 is available ;)

@rieger-jared
Copy link

Make sure you port 3000 is available ;)

I did have a phantom process running on 3000, so freeing this port fixed my issue. However, why is hydrogen not able to choose another port?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working SEV-3
Projects
None yet
Development

No branches or pull requests

6 participants