Commit d3518242 authored by Saro Vindigni's avatar Saro Vindigni Committed by Tim Neutkens

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
parent 2abcfec1
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
"function": "next" "function": "next"
} }
], ],
"predeploy": "yarn build-public" "predeploy": "npm run build-public"
}, },
"functions": { "functions": {
"source": "dist/functions", "source": "dist/functions",
"predeploy": "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"
} }
} }
{ {
"name": "with-firebase-hosting", "name": "with-firebase-hosting",
"version": "3.0.0", "version": "3.0.0",
"description": "description": "Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects.",
"Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects.",
"scripts": { "scripts": {
"dev": "next src/app", "dev": "next src/app",
"serve": "serve": "echo \"for details see:\n\thttps://github.com/firebase/firebase-tools/issues/535 \n\thttps://github.com/zeit/next.js/issues/3167\";",
"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", "deploy": "firebase deploy",
"clean": "rimraf \"dist/functions\" && rimraf \"dist/public\"", "clean": "rimraf \"dist/functions\" && rimraf \"dist/public\"",
"build-public": "cpx \"src/public/**/*.*\" \"dist/public\" -C", "build-public": "cpx \"src/public/**/*.*\" \"dist/public\" -C",
"build-funcs": "babel \"src/functions\" --out-dir \"dist/functions\"", "build-funcs": "babel \"src/functions\" --out-dir \"dist/functions\"",
"build-app": "next build \"src/app\"", "build-app": "next build \"src/app\"",
"copy-deps": "copy-deps": "cpx \"*{package.json,package-lock.json,yarn.lock}\" \"dist/functions\"",
"cpx \"*{package.json,package-lock.json,yarn.lock}\" \"dist/functions\"",
"install-deps": "cd \"dist/functions\" && npm i" "install-deps": "cd \"dist/functions\" && npm i"
}, },
"dependencies": { "dependencies": {
"firebase-admin": "5.8.1", "firebase-admin": "5.8.1",
"firebase-functions": "^0.8.1", "firebase-functions": "^0.8.1",
"next": "latest", "next": "^5.0.1-canary.13",
"react": "^16.2.0", "react": "^16.2.0",
"react-dom": "^16.2.0" "react-dom": "^16.2.0"
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment