Repository navigation
fix(firebase): could not find functions.yaml - #627
DevJoghurt wants to merge 6 commits into
Conversation
|
@DevJoghurt Awesome! I also just fixed this issue and wrote the exact same helper function. Was about to submit a PR, guess I don't have to! |
danielroe
left a comment
There was a problem hiding this comment.
This is great - thank you!
Would you try instead whether it's possible to include these files by adding them to the externals.traceInclude array rather than running a manual copy?
Codecov Report
@@ Coverage Diff @@
## main #627 +/- ##
===========================================
- Coverage 76.89% 66.35% -10.54%
===========================================
Files 68 57 -11
Lines 6829 4182 -2647
Branches 693 446 -247
===========================================
- Hits 5251 2775 -2476
+ Misses 1577 1403 -174
- Partials 1 4 +3
|
|
@danielroe export const firebase = defineNitroPreset({
entry: '#internal/nitro/entries/firebase',
externals: {
traceInclude: ['firebase-functions/lib/bin/firebase-functions.js']
},
commands: {
deploy: 'npx firebase deploy'
},
hooks: {
async 'compiled' (ctx) {
//resolveRequiredNodeModules(ctx)
await writeRoutes(ctx)
}
}
})It is failing with the following error: I think the problem is that the firebase cli needs the following file to work correctly: node_modules/.bin/firebase-functions. |
functions.yaml
|
Kind reminder for review @danielroe If it is not relevant anymore or you think an alternative method could be better, would be happy to move it to an issue to track. |
|
Apologies - I missed this. @DevJoghurt I think you can pass paths to binaries as well - they just need to be full paths (that is, including |
Sure, I'll give it a try and then give you feedback. |
|
@danielroe |
|
@DevJoghurt , could you please provide a reproduction ? from my latest tests with nitro and nuxt, the firebase preset works for me without additional modifications, see here #1370 If this fixes #628 or an untracked bug, then this is fine |
|
Yes, that is correct. It seems to work with the latest firebase cli version. |
🔗 Linked issue
nuxt/framework#236
❓ Type of change
📚 Description
Problem was described in this issue nuxt/framework#236
For internal reasons Firebase cli calls a node script 'spawn ./node_modules/.bin/firebase-functions'.
Nitro cannot know about this and does not copy the necessary files via '@vercel/nft'.
I have written a small function that copies all the missing necessary files so that the deployment can be performed.
📝 Checklist