framework icon indicating copy to clipboard operation
framework copied to clipboard

v3.0.0-rc.12 - Google Firebase functions no longer generated by Nitro

Open Sandlens opened this issue 3 years ago • 8 comments

Environment



Reproduction

.

Describe the bug

I am hosting my Nuxt project on Google Firebase.

Since upgrading to v3.0.0-rc.12, npx nuxi build no longer generates functions properly in .output\server, despite setting the preset to Firebase with the following:

export default defineNuxtConfig({
  nitro: {
    preset: 'firebase'
  }
})

The issue also occurs if using NITRO_PRESET=firebase npm run build.

When attempting preview the project locally with firebase emulators:start, the following error occurs:

i  functions: Watching "C:\Users\<...>\<repo-name>\.output\server" for Cloud Functions...
The system cannot find the path specified.

Error: An unexpected error has occurred.

Hence, the project cannot be previewed locally or deployed.

Additional context

No response

Logs

From firebase-debug.log:

[debug] [2022-10-19T01:36:21.196Z] Building nodejs source
[debug] [2022-10-19T01:36:21.197Z] Analyzing nodejs backend spec
[debug] [2022-10-19T01:36:21.198Z] Could not find functions.yaml. Must use http discovery
[debug] [2022-10-19T01:36:21.223Z] Error: spawn ./node_modules/.bin/firebase-functions ENOENT
    at notFoundError (C:\Users\louis\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (C:\Users\louis\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-spawn\lib\enoent.js:40:16)
    at ChildProcess.cp.emit (C:\Users\louis\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-spawn\lib\enoent.js:27:25)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
[error] 
[error] Error: An unexpected error has occurred.

Sandlens avatar Oct 19 '22 01:10 Sandlens