Jamie Curnow
1 min readMar 20, 2021

--

Hey Hugo. So during the 'Deployment To Firebase' step, I don't believe that container would have context of your built application. If you're following this article, you'll not be needing to 'host' your nuxt site on firebase hosting, just leveraging it as a global, configurable and easy to deploy CDN that proxies through to Cloud Run.

So you just need to point the 'public' property to a valid directory in your project that exists before a 'yarn build' happens. For me, a folder that is always there and does nothing funky is the nuxt static folder. So I just point the 'public' property to './static'. You could create a new, empty directory in your project, commit it to git and point 'public' at that.

You can even go one step further to demonstrate and tell firebase to ignore everything in that folder (interestingly with this rule, it still requires the directory to exist):

```firebase.json

{

// ...

"hosting": {

"public": "static",

"ignore": [

"**/.*",

]

}

}

```

I think that the main point here is that I believe your error roots from the "Deploy to Firebase" step not having the context of the build. So it's running in an environment where it's just git pulled your repo and that's it.

--

--

Jamie Curnow
Jamie Curnow

Written by Jamie Curnow

I am a javascript developer living in beautiful Cornwall, UK. Ever curious, always learning.

Responses (1)