-
Notifications
You must be signed in to change notification settings - Fork 288
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
Cannot start project with latest configuration - npm run dev fails to launch #2000
Comments
@danabdn From the looks of it, I think your project may be missing some vite setup. Run |
I also recommend updating Hydrogen by using the |
I deleted node_modules and package-lock.json, ran the setup vite command (result: This project already has a Vite config file) and then tried npm run dev again and nothing. Just exits with code 1. I.e. the CLI has crashed and is not reporting anything. Problem still present - code 1 suggests it's a crash with the CLI. |
Okay - so I deduced there was a problem with the CLI (as above) and discovered that there was and upgrade available from v3.52.0 to v3.58.2. Now I get an actual error message... Failed to load PostCSS config (searchPath: C:/GitHub/XXXX/hydrogen/hydrogen): [ReferenceError] module is Guess I will review my package.json for any possible upgrades and look at the above error. |
Step forward - to resolve the above error, you can rename postcss.config.js to postcss.config.cjs (or possibly just delete the file). The web development server text now appears in the CLI :-) However, when launching the web dev server in a browser, the following message is displayed on black background with white text.
AND /graphiql results in the same error message.
|
As mentioned by others, I would recommend reverting back to your original project, then do This last command already renames your Otherwise, if you prefer to do it manually, here's what we do in the command to have a reference of what you need to change: https://github.com/Shopify/hydrogen/blob/main/packages/cli/src/commands/hydrogen/setup/vite.ts#L52
This is unrelated to the first issue. The problem here is that |
What is the location of your example repository?
Private
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
Templates > Skeleton > Latest as of 15th April 2024 (package.json below)
What version of Remix are you using?
^2.8.0
Steps to Reproduce
Package.json
Expected Behavior
Actual Behavior
PROBLEM 1 - The web development server does not load - command exits with no error (or anything at all) and back to where you can type in the next command.
Running the npm run dev command (shown below), the terminal in VSCode just exits without displaying an error.
PS C:\GitHub\XXXX\hydrogen\hydrogen> npm run dev
PS C:\GitHub\XXXX\hydrogen\hydrogen>
PROBLEM 2 - A new file is created called "vite.config.ts.timestamp-xxxx.mjs (where x is a timestamp).
The content of the vite config file that is automatically created (every time I run npm run dev) outputs the following...
I cannot view my website locally anymore. I cannot develop my app.
When I tried to run npm run dev with debug attached, there is a small popup that shows "Debug adapter process has terminated unexpectedly".
cli-hydrogen is 8.0.0 (based on the version number - most likely to be the culprit).
It should at least give an error e.g. where about it encountered the error.
Now cannot do anything on the project. Any help appreciated or possibly indicate how I diagnose this critical error.
PS I've really been enjoying developing my Hydrogen project!
Edit: Stack Overflow issue submitted here
The text was updated successfully, but these errors were encountered: