Comments (3)
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
from hydrogen.
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.
from hydrogen.
Thanks again @blittle. Between your example and some help from a popular AI tool, it's now working.
To resolve...
- Changed the version of node from 16 to 18 (to match the one hydrogen uses). I'll take a look at nvmrc at a later date once I've obviously learned some more about CI & GitHub.
- To edit the yml file (in my case to move from a very old version of yarn to npm), this can be found in your project under the folder .github\workflows (easy to miss - I didn't realise it was even in my project). Update to use npm (ask ChatGPT to do this for you while checking the current version - edit sensibly). If you get an error about npm build, add npm run build instead.
- In GitHub Actions you can see your action success (or failure) results which gives details of any issues. Good error messages make it easy to diagnose issues.
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.
from hydrogen.
Related Issues (20)
- Local environment freezes when navigating HOT 5
- @shopify/cli-hydrogen 7.0 prevents custom fonts from loading correctly. HOT 5
- [Bug?][Hydrogen Demo Store] new customer account API: customer page error if their oder contains unfulfilled items HOT 2
- When running npm run dev for a Shopify Hydrogen Storefront project, the following error are encountered: Failed to fetch changelog
- [Bug]: Recent updates give me 'TypeError: config.plugins.map is not a function', crash HOT 20
- Proxy tool. SSL_CERT_FILE is causing an unexpected error occurred [Error: internal error] HOT 2
- msw with worker runtime: Your worker created multiple branches of a single stream (for instance, by calling `response.clone()` or `request.clone()`)
- Oxygen deployment failing with error: Cannot find package '@shopify/cli-kit' HOT 14
- [Hydrogen Skeleton] Issues with Predictive Search + Search page improvements HOT 1
- [Hydrogen Skeleton] There is no collections/all page in the Hydrogen skeleton like there is for Liquid
- Shopify Customer Account Page uses 3rd Party Cookies HOT 1
- Login: TypeError: Invalid URL string HOT 8
- Issues with fetching third party data when using MiniOxygen worker runtime HOT 1
- ShopPayButton component should redirect to localized checkout
- CSP are too strict locally that it can't run React Developer Tools in Firefox HOT 1
- [Bug] Can't view details in Order History when use Customer Account API HOT 1
- Remove Mock Shop references from default .env HOT 3
- Listbox Keyboard Input (A11y)
- Items added to the cart or updated within the cart do not maintain the selected currency HOT 7
- Add post logout redirect option in customerAccount.logout HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydrogen.