JFGHT
April 23, 2020, 7:58am
1
Hello,
So I’m trying to deploy my repo but Nuxt keeps trying to compile the firebase functions
folder, so the build crashes with:
9:47:54 AM: ERROR in /opt/build/repo/functions/src/index.ts
9:47:54 AM: ERROR in /opt/build/repo/functions/src/index.ts(1,28):
9:47:54 AM: 1:28 Cannot find module ‘firebase-functions’.
9:47:54 AM: > 1 | import * as functions from ‘firebase-functions’;
This does not happen in localhost, only in Netlify. Why is Nuxt trying to build the functions
folder here in Netlify only?
My instance is: https://hopeful-tereshkova-d2eeb5.netlify.app
Thanks.
fool
April 25, 2020, 5:38am
2
At a guess, you have a different configuration here than there, which behaves differently. Have you read this article about debugging builds? It shows you how to make sure we use the same version locally and in our CI, which resolves many “works here and not there” problems:
Last reviewed by Netlify Support - August, 2023
Note: This article is only about builds within Netlify’s Continuous Integration (CI) environment, as triggered from git commits or from incoming build webhooks . You can learn more in depth about how Netlify builds your site in this article about how our build bots build sites .
Some background
There are a fair number of reasons that a build could fail in Netlify’s CI environment, even if building works locally. Testing locally is always the place …