From 648b52c9c128d9f68fa03600029c471f48d62be2 Mon Sep 17 00:00:00 2001 From: maerzhase Date: Mon, 8 Feb 2021 17:03:47 +0100 Subject: [PATCH 1/3] Update dependencies, fixes npm run serve --- examples/with-firebase-hosting/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/with-firebase-hosting/package.json b/examples/with-firebase-hosting/package.json index 7a70f855076c..35c63c7b2d1b 100644 --- a/examples/with-firebase-hosting/package.json +++ b/examples/with-firebase-hosting/package.json @@ -13,15 +13,15 @@ "logs": "firebase functions:log" }, "dependencies": { - "firebase-admin": "^8.9.0", - "firebase-functions": "^3.3.0", - "next": "^9.3.4", + "firebase-admin": "^9.4.2", + "firebase-functions": "^3.13.1", + "next": "^9.5.5", "react": "^16.13.1", "react-dom": "^16.13.1" }, "devDependencies": { - "firebase-functions-test": "^0.1.6", - "firebase-tools": "^8.6.0" + "firebase-functions-test": "^0.2.3", + "firebase-tools": "^9.3.0" }, "license": "MIT" } From 8319267654c56105dc02fea44dfbe7da2f64db15 Mon Sep 17 00:00:00 2001 From: maerzhase Date: Tue, 9 Feb 2021 11:06:52 +0100 Subject: [PATCH 2/3] use latest next and react 17.0.1 --- examples/with-firebase-hosting/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/with-firebase-hosting/package.json b/examples/with-firebase-hosting/package.json index 35c63c7b2d1b..abd9f6d73c43 100644 --- a/examples/with-firebase-hosting/package.json +++ b/examples/with-firebase-hosting/package.json @@ -15,9 +15,9 @@ "dependencies": { "firebase-admin": "^9.4.2", "firebase-functions": "^3.13.1", - "next": "^9.5.5", - "react": "^16.13.1", - "react-dom": "^16.13.1" + "next": "latest", + "react": "^17.0.1", + "react-dom": "^17.0.1" }, "devDependencies": { "firebase-functions-test": "^0.2.3", From 8b7f134ee52a995d68f706dce2cbc9fb0f359f8f Mon Sep 17 00:00:00 2001 From: maerzhase Date: Tue, 9 Feb 2021 11:07:23 +0100 Subject: [PATCH 3/3] never run next in firebase function in dev mode - related to #8893 --- examples/with-firebase-hosting/firebaseFunctions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/with-firebase-hosting/firebaseFunctions.js b/examples/with-firebase-hosting/firebaseFunctions.js index 9241139d16f4..3d8c8a5a8e19 100644 --- a/examples/with-firebase-hosting/firebaseFunctions.js +++ b/examples/with-firebase-hosting/firebaseFunctions.js @@ -2,11 +2,10 @@ const { join } = require('path') const { https } = require('firebase-functions') const { default: next } = require('next') -const isDev = process.env.NODE_ENV !== 'production' const nextjsDistDir = join('src', require('./src/next.config.js').distDir) const nextjsServer = next({ - dev: isDev, + dev: false, conf: { distDir: nextjsDistDir, },