Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$ firebase deploy does not build (experimental webframeworks). #5907

Closed
shauryaaher opened this issue May 28, 2023 · 4 comments
Closed

$ firebase deploy does not build (experimental webframeworks). #5907

shauryaaher opened this issue May 28, 2023 · 4 comments

Comments

@shauryaaher
Copy link

[REQUIRED] Environment info

Firebase version 12.2.1

Platform: Windows.

[REQUIRED] Test case

I'm trying to deploy my site to Firebase Hosting. I'm using the experimental webframeworks setting (React + TypeScript + Vite) without Cloud Functions. When I run $ firebase deploy, the CLI runs the vite dev command and the local development server stars.

[REQUIRED] Steps to reproduce

Create a new web app with the experimental webframeworks setting and try to deploy it with $ firebase deploy.

[REQUIRED] Expected behavior

I need the CLI to build my site using the vite build command. This worked in previous versions of the CLI, but it doesn't work in the current version. Please help.
This is the expected behavior.

[debug] [2023-05-28T16:24:51.703Z] ----------------------------------------------------------------------
[debug] [2023-05-28T16:24:51.706Z] Command: C:<PATH_TO_BIN_FILE>
[debug] [2023-05-28T16:24:51.707Z] CLI Version: 12.2.1
[debug] [2023-05-28T16:24:51.707Z] Platform: win32
[debug] [2023-05-28T16:24:51.708Z] Node Version: v16.15.0
[debug] [2023-05-28T16:24:51.709Z] Time: Sun May 28 2023 21:54:51 GMT+0530 (India Standard Time)
[debug] [2023-05-28T16:24:51.709Z] ----------------------------------------------------------------------
[debug]
[debug] [2023-05-28T16:24:51.821Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2023-05-28T16:24:51.832Z] > authorizing via signed-in user ([email protected])
[debug] [2023-05-28T16:24:51.834Z] [iam] checking project magnum-opus-to-do for permissions ["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]
[debug] [2023-05-28T16:24:51.840Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions [none]
[debug] [2023-05-28T16:24:51.843Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions x-goog-quota-user=projects/magnum-opus-to-do
[debug] [2023-05-28T16:24:51.846Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions {"permissions":["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-05-28T16:24:53.491Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions 200
[debug] [2023-05-28T16:24:53.493Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions {"permissions":["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-05-28T16:24:53.498Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do [none]
[debug] [2023-05-28T16:24:54.194Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do 200
[debug] [2023-05-28T16:24:54.196Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do {"projectId":"magnum-opus-to-do","projectNumber":"127711044543","displayName":"To-do list","name":"projects/magnum-opus-to-do","resources":{"hostingSite":"magnum-opus-to-do"},"state":"ACTIVE","etag":"1_c355d538-ee76-4676-a5df-8bab1ea70b37"}
[debug] [2023-05-28T16:25:01.546Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites pageToken=&pageSize=10
[debug] [2023-05-28T16:25:02.658Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites 200
[debug] [2023-05-28T16:25:02.659Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites {"sites":[{"name":"projects/magnum-opus-to-do/sites/magnum-opus-to-do","defaultUrl":"https://magnum-opus-to-do.web.app","type":"DEFAULT_SITE"}]}
[debug] [2023-05-28T16:25:02.662Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites
[debug] [2023-05-28T16:25:03.713Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites 200
[debug] [2023-05-28T16:25:03.715Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites {"sites":[{"name":"projects/magnum-opus-to-do/sites/magnum-opus-to-do","defaultUrl":"https://magnum-opus-to-do.web.app","type":"DEFAULT_SITE"}]}
[debug] [2023-05-28T16:25:03.718Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do/webApps/-/config [none]
[debug] [2023-05-28T16:25:04.842Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do/webApps/-/config 200
[debug] [2023-05-28T16:25:04.844Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do/webApps/-/config {"projectId":"magnum-opus-to-do","appId":"1:127711044543:web:b2fb754ce2e9208279f70a","storageBucket":"magnum-opus-to-do.appspot.com","apiKey":"AIzaSyCmJhSjgSHFrdDVtn7lczcXgmo5Gdsctrc","authDomain":"magnum-opus-to-do.firebaseapp.com","messagingSenderId":"127711044543"}
[debug] [2023-05-28T16:25:29.216Z] ----------------------------------------------------------------------
[debug] [2023-05-28T16:25:29.219Z] Command: C:<PATH_TO_BIN_FILE>
[debug] [2023-05-28T16:25:29.219Z] CLI Version: 12.2.1
[debug] [2023-05-28T16:25:29.220Z] Platform: win32
[debug] [2023-05-28T16:25:29.220Z] Node Version: v16.15.0
[debug] [2023-05-28T16:25:29.221Z] Time: Sun May 28 2023 21:55:29 GMT+0530 (India Standard Time)
[debug] [2023-05-28T16:25:29.222Z] ----------------------------------------------------------------------
[debug]
[debug] [2023-05-28T16:25:29.346Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2023-05-28T16:25:29.347Z] > authorizing via signed-in user ([email protected])
[debug] [2023-05-28T16:25:29.347Z] [iam] checking project magnum-opus-to-do for permissions ["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]
[debug] [2023-05-28T16:25:29.350Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions [none]
[debug] [2023-05-28T16:25:29.351Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions x-goog-quota-user=projects/magnum-opus-to-do
[debug] [2023-05-28T16:25:29.351Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions {"permissions":["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-05-28T16:25:30.871Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions 200
[debug] [2023-05-28T16:25:30.872Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/magnum-opus-to-do:testIamPermissions {"permissions":["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-05-28T16:25:30.875Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do [none]
[debug] [2023-05-28T16:25:31.569Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do 200
[debug] [2023-05-28T16:25:31.569Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do {"projectId":"magnum-opus-to-do","projectNumber":"127711044543","displayName":"To-do list","name":"projects/magnum-opus-to-do","resources":{"hostingSite":"magnum-opus-to-do"},"state":"ACTIVE","etag":"1_c355d538-ee76-4676-a5df-8bab1ea70b37"}
[debug] [2023-05-28T16:25:37.121Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites pageToken=&pageSize=10
[debug] [2023-05-28T16:25:38.218Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites 200
[debug] [2023-05-28T16:25:38.219Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites {"sites":[{"name":"projects/magnum-opus-to-do/sites/magnum-opus-to-do","defaultUrl":"https://magnum-opus-to-do.web.app","type":"DEFAULT_SITE"}]}
[debug] [2023-05-28T16:25:38.220Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites
[debug] [2023-05-28T16:25:39.244Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites 200
[debug] [2023-05-28T16:25:39.245Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/magnum-opus-to-do/sites {"sites":[{"name":"projects/magnum-opus-to-do/sites/magnum-opus-to-do","defaultUrl":"https://magnum-opus-to-do.web.app","type":"DEFAULT_SITE"}]}
[debug] [2023-05-28T16:25:39.246Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do/webApps/-/config [none]
[debug] [2023-05-28T16:25:40.471Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do/webApps/-/config 200
[debug] [2023-05-28T16:25:40.472Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/magnum-opus-to-do/webApps/-/config {"projectId":"magnum-opus-to-do","appId":"1:127711044543:web:b2fb754ce2e9208279f70a","storageBucket":"magnum-opus-to-do.appspot.com","apiKey":"AIzaSyCmJhSjgSHFrdDVtn7lczcXgmo5Gdsctrc","authDomain":"magnum-opus-to-do.firebaseapp.com","messagingSenderId":"127711044543"}

Please help.
Thanks in advance :).

@aalej
Copy link
Contributor

aalej commented May 29, 2023

Hi @shauryaaher, thanks for reporting this issue. Based on what you described, this looks similar to #5896. To verify, could you try running FIREBASE_FRAMEWORKS_BUILD_TARGET=production firebase deploy to see if the deployment would work?

If the deployment works, the issue should be fixed by #5895. Another alternative is to downgrade to firebase-tools v12.1.0 while waiting for the fix to be released. If the deployment does not go through, could you describe the behavior after running FIREBASE_FRAMEWORKS_BUILD_TARGET=production firebase deploy? Is there any error messages being raised, does vite dev still seem to start?

@aalej aalej added the Needs: Author Feedback Issues awaiting author feedback label May 29, 2023
@shauryaaher
Copy link
Author

vite dev and vite build still work. I'll try out your recommendations and get back ASAP.

@jamesdaniels
Copy link
Member

new version of firebase-tools just dropped, 12.3.0, this should include the fix for vite dev vs build being called during deployment

@shauryaaher
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants