Shopify / hydrogen-demo-store

This template contains a full-featured setup of components, queries and tooling to get started with Hydrogen. It is deployed to https://hydrogen.shop
100 stars 34 forks source link

fix dependency issue #33

Closed michenly closed 4 months ago

michenly commented 4 months ago

Fix issue found https://github.com/Shopify/hydrogen/issues/2048

Using node v22

Could not find ts-node This error is fixed by pinning @shopify/cli to 3.58.0

Which would cause further issue similar to https://github.com/Shopify/hydrogen/issues/1833

Unhandled Rejection: TypeError: The "strategy" argument must be of type object...

Using @shopify/mini-oxygen@^3.0.1 fixed this issue

BorgoSantoPietro commented 4 months ago

@michenly I've tried to install the @shopify/mini-oxygen@3.0.1 to resolve the issue although,

im running >>>

h2-store-front@1.0.3 dev shopify hydrogen dev --codegen

Environment variables injected into MiniOxygen:

PUBLIC_STOREFRONT_ID from local .env PUBLIC_STOREFRONT_API_TOKEN from local .env PUBLIC_STORE_DOMAIN from local .env PRIVATE_STOREFRONT_API_TOKEN from local .env PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID from local .env PUBLIC_CUSTOMER_ACCOUNT_API_URL from local .env SESSION_SECRET from local .env

and still have the same issue :

TypeError [ERR_INVALID_ARG_TYPE]: The "strategy" argument must be of type object. Received type number (0) at new ReadableStream (node:internal/webstreams/readablestream:254:5) at safeReadableStreamFrom (/Users/zani/Documents/git/BSP/H2-StoreFront/node_modules/miniflare/dist/src/index.js:8418:10) at #handleLoopback (/Users/zani/Documents/git/BSP/H2-StoreFront/node_modules/miniflare/dist/src/index.js:8580:36) at Server.emit (node:events:532:35) at Server.emit (node:domain:488:12) at parserOnIncoming (node:_http_server:1149:12) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)

I tried using a different node version node@20 and the problem still persist.

Do you recommend any other solution?

im running >>>

h2-store-front@1.0.3 dev shopify hydrogen dev --codegen

Environment variables injected into MiniOxygen:

PUBLIC_STOREFRONT_ID from local .env PUBLIC_STOREFRONT_API_TOKEN from local .env PUBLIC_STORE_DOMAIN from local .env PRIVATE_STOREFRONT_API_TOKEN from local .env PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID from local .env PUBLIC_CUSTOMER_ACCOUNT_API_URL from local .env SESSION_SECRET from local .env

and still have the same issue :

TypeError [ERR_INVALID_ARG_TYPE]: The "strategy" argument must be of type object. Received type number (0) at new ReadableStream (node:internal/webstreams/readablestream:254:5) at safeReadableStreamFrom (/Users/zani/Documents/git/BSP/H2-StoreFront/node_modules/miniflare/dist/src/index.js:8418:10) at #handleLoopback (/Users/zani/Documents/git/BSP/H2-StoreFront/node_modules/miniflare/dist/src/index.js:8580:36) at Server.emit (node:events:532:35) at Server.emit (node:domain:488:12) at parserOnIncoming (node:_http_server:1149:12) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)

I tried using a different node version node@20 and the problem still persist.

Do you recommend any other solution?

michenly commented 4 months ago

@BorgoSantoPietro the original issue have a few more things you can try https://github.com/Shopify/hydrogen/issues/1833

defin remove your node_module and re-install as a first step