Comments (6)
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.
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.
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.
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.
I made a version with fetch
. I tested it, and it seems to have fixed the problem 👍
from stocks.js.
Follow this approach, it will solve the problem:
webpack/webpack-dev-server#66
from stocks.js.
Related Issues (20)
- stocks.js as name is not recommended HOT 1
- timeSeries does not work HOT 1
- nodejs broken HOT 2
- Use URL.searchParams HOT 1
- Error hashtable HOT 1
- Invalid Date in Firefox HOT 2
- Alphavantage removed intraday data for interval like 1min, 5min, hourly etc HOT 4
- ReferenceError: Stocks is not defined HOT 3
- Please generate ES5 code in dist
- node-fetch in browser environments HOT 1
- stock requests only meet 2/3 of data points HOT 2
- TypeError: this._throw is not a function HOT 3
- More intervals
- Stocks is not a constructor HOT 3
- Get current stock price? HOT 6
- how do I display company name to my page
- Readme RE: not currently hosting JS HOT 1
- jsfiddle retrieve not working
- @types/stocks.js for typescript support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stocks.js.