firebase / firebase/firebase-tools

Webframeworks do not deploy nextjs ssr{projectId} function when using project aliases

Open
#5,880 4 comments 0 reactions 0 assignees View on GitHub
integration: web frameworks type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [REQUIRED] Environment info

**firebase-tools:12.1.0**

**Platform:macOS**

### [REQUIRED] Test case

Repository with two firebase projects set as aliases. Add Nextjs project inside it.
This is hosting setting from `firebase.json`:

```
"hosting": [
{
"target": "cms",
"source": "cms",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"frameworksBackend": {
"region": "us-central1"
}
}
],
```

### [REQUIRED] Steps to reproduce

```
firebase use {alias}
firebase deploy --only hosting
```

### [REQUIRED] Expected behavior

`ssr{projectId}` function should be deployed but it does not and see warning in deploy command:
```
hosting[...]: Unable to find a valid endpoint for function `ssr...`, but still including it in the config
```
I got it working when using default project. It stopped working after adding new project alias and trying to deploy the same website under different project. I am assuming that's the reason but maybe something got broken with latest versions of CLI?

### [REQUIRED] Actual behavior

After deploying page returns 404.
Logs attached:

[logs.txt](https://github.com/firebase/firebase-tools/files/11543103/logs.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.