slate
slate copied to clipboard
Slate Analytics 404
This repo is currently on low maintenance. See README for details
Problem
Shopify's Slate Analytics has been disabled/broken/shut down which causes recurring 404s when using Slate.
Replication steps
- Install Slate v1 or use an existing Slate v1 project
- If not using an existing project create a new project
- Run
watch
orstart
✔ Compiled successfully in 1.259s!
(node:50840) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (/Users/username/slatedirectory/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/username/slatedirectory/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/Users/username/slatedirectory/node_modules/axios/lib/adapters/http.js:202:11)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
(node:50840) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
★ You are editing files in theme 123456789 on the following store:
https://myshopifystore.myshopify.com?preview_theme_id=123456789
More Information
Because the analytics service has been disabled/broken/shut down, the 404 can be patched by disabling the Axios post in node_modules/@shopify/slate-analytics/index.js
. As always this patch will only last until you install a project dependency or update project dependencies.

Thanks @curiouscrusher
@t-kelly What's the word here? Noticed this issue starting this morning. Will there be a patch provided?
The internal Kafka service I was using for Slate analytics has been shut down. Will open a PR to remove this and the consent form that users agree to when installing Slate.
These analytics have been really helpful, showing 2500+ weekly active users running Slate. This ultimately helps add fuel to fire of getting Slate/developer tooling prioritized. Thanks all!
Great to hear there's some solid numbers behind Slate usage, thanks for the insight there @t-kelly!
Looking forward to the patch and hopefully increased project priority 🤞
In the meantime you can silence these errors by updating your node_modules/@shopify/slate-analytics/index.js file to suppress errors on line 95:
return axios('https://v.shopify.com/slate/track', axiosConfig).catch(() => {});
In the meantime you can silence these errors by updating your node_modules/@shopify/slate-analytics/index.js file to suppress errors on line 95:
return axios('https://v.shopify.com/slate/track', axiosConfig).catch(() => {});
Similarly useful fix;
return new Promise(resolve => resolve(true));
Edit, permanent fix, run in your terminal/powershell;
node -e "q=String.fromCharCode(34);b=require; b('fs').writeFileSync(b('os').homedir()+'/.slaterc','{'+q+'tracking'+q+':false}');"
tl;dr: sets tracking
to false
within .slaterc
of your OS' home dir
@t-kelly If you have a chance to look at #1078 it may be a quick win to clear up the 404 issues.
I suspect due to Slate's end of support, folks will be experiencing the same error above. Commenting the following line of code from node_modules/@shopify/slate-analytics/index.js
return axios('https://v.shopify.com/slate/track', axiosConfig);
In case this is of any use to people, I solved this issue by creating a script that I run on "postinstall"
in my node_modules
.
#!/bin/bash
function clear-slate-analytics() {
rm node_modules/@shopify/slate-analytics/index.js
touch node_modules/@shopify/slate-analytics/index.js
echo "async function init(){}function event(n,t){}module.exports={init:init,event:event};" >> node_modules/@shopify/slate-analytics/index.js
}
clear-slate-analytics
That last line just replaces all the functions with a no-op.
Hey i cant find @shopify in my node_modules have the same issue can anyone help ?
@rafaelfranca what does ls node_modules/@shopify
output?
If nothing than it’s most likely you aren’t using a recent version of Slate (before deprecation).
I created a fork for slate-tools with this error fixed. If you wanna use it do this:
yarn add peanut-butter-co/slate-tools#1.0.0-beta.20