Git Product home page Git Product logo

Comments (4)

janpio avatar janpio commented on August 28, 2024 3

You can unblock yourself by installing for example this Chrome extension: https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf?hl=en

from webcontainer-core.

janpio avatar janpio commented on August 28, 2024 1

This is probably caused by the browser rejecting the request because of CORS reasons. From the linked Blitz above, https://stackblitz.com/edit/node-zfkjjc?file=index.js, I get this in my console before the hangup message comes:

Access to fetch at 'https://sampson.codes/' from origin 'https://node-zfkjjc.jw.staticblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

image

Something very similar happens in our Node ORM Prisma, which needs to download a binary from a server to work: prisma/prisma#7185

from webcontainer-core.

KwintenP avatar KwintenP commented on August 28, 2024

This is supposed to work. Bug confirmed.

Thanks for reporting 🙏

from webcontainer-core.

KwintenP avatar KwintenP commented on August 28, 2024

Like @janpio said, this issue happens cause it's not possible to call the url from the browser's env, which is where WebContainer is running.

See an example here: https://stackblitz.com/edit/typescript-ive2dd.

You need to make sure this call works, and then the v2 project should also work.

from webcontainer-core.

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.