Giter Site home page Giter Site logo

Comments (6)

wagenaartje avatar wagenaartje commented on August 25, 2024

Hmm. I'm not sure why this is happening. Travis CI seems to handle it fine. Are you sure using the linked library would fix this? What node version are you using?

from stocks.js.

kresli avatar kresli commented on August 25, 2024
node -v
v8.1.3

I created a sample repo. https://github.com/kresli/stocks-js-test. You can test it with npm run build

from stocks.js.

wagenaartje avatar wagenaartje commented on August 25, 2024

Yep. Managed to reproduce it. I'm not really familiar with what target: 'node' does specifically. But you might be right in that we need to seek a new request module.

from stocks.js.

wagenaartje avatar wagenaartje commented on August 25, 2024

I'm quite embarassed to say I never knew fetch existed. If you're sure that this doesn't create any problems (and if you're sure it fixes the current one), please do switch from XMLHttpRequest to the listed library.

It seems to work like a charm (run from page with appropiate content security policy):

fetch('https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo')
  .then(function (response) {
    return response.json()
  }).then(function (body) {
    console.log(body)
  });

from stocks.js.

wagenaartje avatar wagenaartje commented on August 25, 2024

I made a version with fetch. I tested it, and it seems to have fixed the problem 👍

from stocks.js.

parvezk avatar parvezk commented on August 25, 2024

Follow this approach, it will solve the problem:
webpack/webpack-dev-server#66

from stocks.js.

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.