Coder Social home page Coder Social logo

Comments (2)

sbyeol3 avatar sbyeol3 commented on June 18, 2024 1

fetch를 날려서 status가 200대가 아닌 경우랑 애초에 fetch를 날릴 수 없는 (내부 서버 포트가 열리지 않는 경우)는 다르게 작동한다.
전자는 catch에 잡히지만 후자는 try catch에 잡히지 않는 케이스다. ㄴㅇㄱ

from project18-b-web-duxit.

sbyeol3 avatar sbyeol3 commented on June 18, 2024

에러 설명

ReferenceError: regeneratorRuntime is not defined
async-await 문법으로 data를 fetch하는 데 발생한 에러!

=> webpack 설정에 babel 을 지정해 두었기 때문에 babel 이 await / await 코드를 (이것의 구현 모듈인) regeneratorRuntime 로 변환한 것으로 파악하였다. 라고 블로그에서 말한다.

  • 추가
    target의 사파리를 9로 했는데 현재는 14여서 이게 버전차이로 fetch가 안된 것이었다..!
    사파리 버전을 높이자!

해결 방법

폴리필을 해야 하는 문제인데 우리는 core js 를 사용하지 않기 때문에 해당 이슈를 해결하기 위해 작은 플러그인을 추가로 설치했다.

npm i @babel/runtime 
npm i -D @babel/plugin-transform-runtime
And, in .babelrc, add:

{
    "presets": ["@babel/preset-env"],
    "plugins": ["@babel/transform-runtime"]
}

from project18-b-web-duxit.

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.