Coder Social home page Coder Social logo

Comments (14)

andyvanosdale avatar andyvanosdale commented on May 24, 2024 1

from vercel.

anhdd-kuro avatar anhdd-kuro commented on May 24, 2024 1

Solve by this comment

from vercel.

andyvanosdale avatar andyvanosdale commented on May 24, 2024

Does this break locally or only when deployed to Vercel? I would recommend checking locally first, and I suspect that it will break locally. Then you can debug and see why the promise rejection is not being handled when using the updated Shopify module.

from vercel.

anhdd-kuro avatar anhdd-kuro commented on May 24, 2024

@andyvanosdale unfortunately , this only break when deployed to Vercel
The error only occur if and try to call api using fetch , the static page have no problem
I will try netify to see is this enviroment problem

from vercel.

andyvanosdale avatar andyvanosdale commented on May 24, 2024

from vercel.

anhdd-kuro avatar anhdd-kuro commented on May 24, 2024

@andyvanosdale
I have created simple reproduction
It's work fine at route /products_2 which directly use fetch , but failed at /products
Maybe this is shopify-app-template-remix 's problem but I can't explain why it's work normally at local
According to the logs , it passed authenticate

スクリーンショット 2024-01-29 12 28 05

from vercel.

andyvanosdale avatar andyvanosdale commented on May 24, 2024

I'm not sure why it may be working locally vs in Vercel. However, I do see that Shopify has called out that the v9 update changed how they use fetch moving forward.

See:

from vercel.

anhdd-kuro avatar anhdd-kuro commented on May 24, 2024

I'm using their latest template and checked the docs, but I did not find any problems.
I said it was working locally, but it is actually hosted on Cloudflare

from vercel.

andyvanosdale avatar andyvanosdale commented on May 24, 2024

from vercel.

anhdd-kuro avatar anhdd-kuro commented on May 24, 2024

@andyvanosdale
It appears that I am not the only person facing this issue!
Please take a look at the problem reported in the Shopify Remix team mentioned above.
Currently, they are addressing the issue by switching the deploy service to Heroku, but this could potentially prove that problems is in the Vercel environment.
Remix team has already responded, stating that they will investigate. However, until then, we have no choice but to change the service or keep running in old version which have many deprecated thing

from vercel.

anhdd-kuro avatar anhdd-kuro commented on May 24, 2024

My bad ! I thought you are on vercel team

from vercel.

andyvanosdale avatar andyvanosdale commented on May 24, 2024

from vercel.

kenju avatar kenju commented on May 24, 2024

@anhdd-kuro

it ran smoothly with Remix version 2.5.1 and Shopify API version 8.1.

Can you share the dependencies from package.json that worked by having shopify-api: 8.1 to see which versions you used for other peer dependencies

The error basically says that the parameters passed does not support Streams API. This is achieved by this polyfill, which vercel/vercel installs here.

The usage of Streams hinges on making responses available as streams. For example, the response body returned by a successful fetch request is a ReadableStream that can be read by a reader created with ReadableStream.getReader().

from vercel.

anhdd-kuro avatar anhdd-kuro commented on May 24, 2024

@kenju
here's dependencies that working with shopify-api: 8.1

"dependencies": {
    "@date-fns/utc": "1.1.1",
    "@dnd-kit/core": "6.1.0",
    "@dnd-kit/sortable": "8.0.0",
    "@formkit/auto-animate": "0.8.1",
    "@hookform/resolvers": "3.3.4",
    "@karabiner-inc/kbc-shared-components": "0.4.5",
    "@prisma/client": "5.8.1",
    "@remix-run/dev": "2.5.1",
    "@remix-run/node": "2.5.1",
    "@remix-run/react": "2.5.1",
    "@remix-run/serve": "2.5.1",
    "@shopify/app": "3.54.0",
    "@shopify/cli": "3.54.0",
    "@shopify/plugin-cloudflare": "3.54.0",
    "@shopify/polaris": "12.11.2",
    "@shopify/polaris-icons": "8.1.0",
    "@shopify/shopify-api": "8.1.1",  // Shopify
    "@shopify/shopify-app-remix": "2.2.0",  // Shopify remix
    "@shopify/shopify-app-session-storage-prisma": "2.0.3",
    "@tanstack/react-table": "8.11.7",
    "@vercel/remix": "2.5.1",
    "date-fns": "^3.3.1",
    "isbot": "4.4.0",
    "lodash": "4.17.21",
    "prisma": "5.8.1",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-hook-form": "7.49.3",
    "react-loading-skeleton": "3.3.1",
    "react-select": "5.8.0",
    "react-toastify": "10.0.4",
    "remix-hook-form": "4.0.1",
    "remix-utils": "^7.5.0",
    "zod": "3.22.4"
  },

from vercel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.