Elkfox / shopify-theme-framework

The original framework for building native Shopify themes.

Home Page:https://concrete.elkfox.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Axios error

garrettboatman opened this issue · comments

Everything appears to be working, but all of my team gets this axios error after yarn start or yarn deploy.

Screen Shot 2019-11-20 at 11 26 15 AM

(node:35580) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
    at createError (/Users/garrettboatman/repos/byte-www/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/garrettboatman/repos/byte-www/node_modules/axios/lib/core/settle.js:18:12)
    at IncomingMessage.handleStreamEnd (/Users/garrettboatman/repos/byte-www/node_modules/axios/lib/adapters/http.js:201:11)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)

Any ideas?

Hey @garrettboatman. We're getting the same error with the current build.

This is an issue with Slate Analytics. You can see the relevant issue at Shopify/slate#1075

This issue includes a fix that is quite suitable until a new version is shipped. Essentially you should change line 95 of node_modules/@shopify/slate-analytics/index.js to return axios('https://v.shopify.com/slate/track', axiosConfig).catch(() => {});. This ensures the script will bail silently if there is an error.

@Cam Thank you! I couldn't find that Slate gh issue.

and thanks for the quick fix tip 🙂