vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.52k stars 4.76k forks source link

Build fails on Netlify after ejecting theme #2799

Open iamchriswick opened 3 years ago

iamchriswick commented 3 years ago

Bug report

Steps to reproduce

What is expected?

Build to succeed

What is actually happening?

Build fails

Other relevant information

davestewart commented 3 years ago

window is not defined

You probably have a component or 3rd party plugin that is referencing window (there are various approaches to tackle this).

I don't think this will be specific to Netlify; did you run the build locally?

iamchriswick commented 3 years ago

@davestewart Vanilla Vuepress - all that is done is ejecting the theme. Builds locally, but not on Netlify.

davestewart commented 3 years ago

I haven't tried it myself, but you could try running it locally using the Netlify environment:

As it happens, I just switched to Vercel. I spent two weeks battling to optimise performance on Netlify which I discovered on my first deploy on Vercel – was simply never an issue.