bstavroulakis / vue-spa

The Vue.js SPA we create together at Pluralsight's "Single Page Applications with Vue.js"
https://app.pluralsight.com/library/courses/vue-js-single-page-applications/table-of-contents
MIT License
102 stars 83 forks source link

UnhandledPromiseRejectionWarning: Unhandled promise rejection #1

Open vladgheorghita7 opened 7 years ago

vladgheorghita7 commented 7 years ago

Hello, I cloned this to my desktop, ran npm install and npm start and and the page doesnt ever load, also, in the console i get UnhandledPromiseRejectionWarning: Unhandled promise rejection - this doesn't break the npm server command, this just outputs to the console. I followed the pluralsight course and got to this point as well.

vladgheorghita7 commented 7 years ago

I think its because axios can not resolve from node context?

bstavroulakis commented 7 years ago

That is true! In the server-side-rendering module I include a check in the interceptor but didn't mention that in the course. => https://github.com/bstavroulakis/vue-spa/commit/9d90c35dc9e36eb53987fcf3fea804141060263a#diff-df94b4e6a3cc3a7772b2b56e8d4c2e61R5

I will include a callout in the course for this. Did this fix your issue?

vladgheorghita7 commented 6 years ago

Hello, Adding the interceptor did not work. I implemented this without using JWT, so i just commented the retrieval and setting of the JWT, thus not using it in my interceptor, but it still doesn't pre-render the axior requests.

bstavroulakis commented 6 years ago

I see, could you please share your project on Github or through email so I can download and check? My email is bstavroulakis@gmail.com

vladgheorghita7 commented 6 years ago

I use the exact same project from github -> I just extracted the zip, ran build:server and build:client and then start:prod -> I get unhandled promise exception. The same error appears if I remove the interceptor you mentioned above

vladimirvrankulj commented 6 years ago

Hi, do we have any news on this. I watched the course, which was really awesome :), but still have the same issue as mentioned above. Basically, if I use vue file as pure template it works, but if script tag is included then this issue occurs.