Closed danabdn closed 7 months ago
Hi Dan, the package.json
file I don't think determines what version of Node is run within the action runner. Instead look inside your Github workflow yml file. For example, our workflow says the node version should come from .nvmrc
Hi Dan, the
package.json
file I don't think determines what version of Node is run within the action runner. Instead look inside your Github workflow yml file. For example, our workflow says the node version should come from .nvmrc
You're right @blittle - there is some sort of weird yml file thing with node 16 and yarn inside. But I have not the first idea how to edit such a document to e.g. use npm instead of yarn. Is there a way to via Shopify e.g. CLI to get this updated or do I need to learn about these files? How do I do it so I don't break the Oxygen server?
Do you know where on the Shopify (Hydrogen) website there exists documentation on this topic? I can't seem to find any which might suggest I shouldn't be touching it.
So - not sure if bug i.e. it should be automatically updated based on current package.json environment, that I need to run a safe CLI command to refresh or that everyone who uses Hydrogen at some point will be forced to start editing this file to make sure up to date e.g. expected version of node
Maybe I'll just upgrade the node version and see if that fixes things. Would be great if it used npm instead of yarn though.
Confusedly yours, Dan.
Thanks again @blittle. Between your example and some help from a popular AI tool, it's now working.
To resolve...
Some documentation does exist and can be found here.
Action needed? Maybe consider adding to a troubleshooting page (add to failing oxygen deployments section) e.g. my project doesn't publish. Then describe how to access Github actions, check errors and give example of node version as a change. Perhaps with reasons why someone may wish to edit this file at all e.g. if it can do something helpful in common scenarios or might need to be updated periodically and if so what's likely needing to be updated.
Thanks, Dan.
What is the location of your example repository?
Private
Which package or tool is having this issue?
Oxygen
What version of that package or tool are you using?
~2023.10.3 (see Package.json below for versions)
What version of Remix are you using?
See Package.json below for versions
Steps to Reproduce
Code is very close to the demo-store on the Hydrgen GitHub page.
Expected Behavior
I expect that the website, which runs fine locally to publish to Oxygen on commit via GitHub. Since it has published fine before, I did not expect any issues. However, I have since upgraded the project to closely match that latest demo-store code. If it works locally, it should work (the same) when published. Any differences I personally would consider a bug and hope you guys would agree too.
Actual Behavior
Examining the GitHub action when deploying to oxygen, which failed at "Add dependencies" stage. Error message below...
(note I have replace the potentially sensitive job urls with [URL].
Notes
My package.json
Obviously need to be able to publish so would appreciate any help.
Thanks, Dan.