From d3518242a6e979f9e33d5738548a5b89f74a709a Mon Sep 17 00:00:00 2001 From: Saro Vindigni Date: Thu, 8 Mar 2018 13:54:32 +0100 Subject: [PATCH] FIX deploy with-firebase-hosting (#3946) * FIX deploy with-firebase-hosting * add npm run command in place of yarn in firebase.json predeploy hooks * Change yarn with npm * firebase-hosting example: Add warning in examples README * firebase-hosting example: clarify warning language * firebase-hosting example: remove the warning and upgrade to canary * firebase-hosting example: actually upgrade pkg.json --- examples/with-firebase-hosting/firebase.json | 4 ++-- examples/with-firebase-hosting/package.json | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/with-firebase-hosting/firebase.json b/examples/with-firebase-hosting/firebase.json index d1e63aeb..a9a5f1ff 100644 --- a/examples/with-firebase-hosting/firebase.json +++ b/examples/with-firebase-hosting/firebase.json @@ -7,11 +7,11 @@ "function": "next" } ], - "predeploy": "yarn build-public" + "predeploy": "npm run build-public" }, "functions": { "source": "dist/functions", "predeploy": - "yarn build-funcs && yarn build-app && yarn copy-deps && yarn install-deps" + "npm run build-funcs && npm run build-app && npm run copy-deps && npm run install-deps" } } diff --git a/examples/with-firebase-hosting/package.json b/examples/with-firebase-hosting/package.json index cc67ffa3..46088eea 100644 --- a/examples/with-firebase-hosting/package.json +++ b/examples/with-firebase-hosting/package.json @@ -1,25 +1,22 @@ { "name": "with-firebase-hosting", "version": "3.0.0", - "description": - "Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects.", + "description": "Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects.", "scripts": { "dev": "next src/app", - "serve": - "echo \"for details see:\n\thttps://github.com/firebase/firebase-tools/issues/535 \n\thttps://github.com/zeit/next.js/issues/3167\";", + "serve": "echo \"for details see:\n\thttps://github.com/firebase/firebase-tools/issues/535 \n\thttps://github.com/zeit/next.js/issues/3167\";", "deploy": "firebase deploy", "clean": "rimraf \"dist/functions\" && rimraf \"dist/public\"", "build-public": "cpx \"src/public/**/*.*\" \"dist/public\" -C", "build-funcs": "babel \"src/functions\" --out-dir \"dist/functions\"", "build-app": "next build \"src/app\"", - "copy-deps": - "cpx \"*{package.json,package-lock.json,yarn.lock}\" \"dist/functions\"", + "copy-deps": "cpx \"*{package.json,package-lock.json,yarn.lock}\" \"dist/functions\"", "install-deps": "cd \"dist/functions\" && npm i" }, "dependencies": { "firebase-admin": "5.8.1", "firebase-functions": "^0.8.1", - "next": "latest", + "next": "^5.0.1-canary.13", "react": "^16.2.0", "react-dom": "^16.2.0" },