google-home / smart-home-nodejs

A sample of the Smart Home device control APIs in Actions on Google
Apache License 2.0
888 stars 289 forks source link

error at create-firebase-config #522

Closed rchiarino closed 3 years ago

rchiarino commented 3 years ago

Hi, I was just following the README:

Setup sample service

  1. Set up the web portal
cd frontend
npm install
npm run create-firebase-config
npm run serve

but when I run:

npm run create-firebase-config

I got this error:

firebase setup:web > ./src/firebase-setup.js

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! smart-home-frontend@0.0.1 create-firebase-config: `firebase setup:web > ./src/firebase-setup.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the smart-home-frontend@0.0.1 create-firebase-config script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

So I have done a bit of research and found that setup:web is deprecated, instead you have to use apps:sdkconfig and specify web as the platform argument.

Then I modified the package.json, Ln 9, Col 31 to firebase apps:sdkconfig web > ./src/firebase-setup.js,

But know I got this:

Error: There are no WEB apps associated with this Firebase project

Inside the generated .js file, Went to firebase, configured a WEB, but I still get the same error, so I think im missing something or doing something wrong. Thanks.

OS: Windows 10 Home, 19041.630

proppy commented 3 years ago

Thanks for the report, we noticed that as well and published a new version of the sample components that should fixes this issue.

The frontend now uses firebase hosting which remove the needs from generating a web sdk configuration (See https://github.com/actions-on-google/smart-home-frontend/commit/5b5dfc403c7e270058d6e4fe68afda7cecb87145 and https://github.com/actions-on-google/smart-home-nodejs/commit/450b3216e0630373afdbc036230c2086c96f64e9 for more details).