firebase/quickstart-js

firestore sample needs updating

Opened this issue · 0 comments

Step 1: Describe your environment

  • Operating system: Windows 10
  • Browser: Chrome
  • Firebase SDK version: 9.8.0? Think it's installed via this: "@angular/fire": "^7.6.1",

Step 2: Describe the problem:

Following instructions, there are tons of errors

Steps to reproduce:

  1. Install Node 22
  2. Clone repository
  3. Nagivate to 'firestore' directory
  4. Install angular cli npm install -g @angular/cli
  5. Install Firebase CLI: npm -g i firebase-tools
  6. npm install
  7. cd functions
  8. npm install
  9. cd ..
  10. npm run start

Observed Results:

Got all kinds of errors, many relating to jasmine or jest like this:

../node_modules/@types/jasmine/index.d.ts:24:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: beforeAll, beforeEach, afterAll, afterEach, describe, fdescribe, xdescribe, it, fit, xit, expect, DEFAULT_TIMEOUT_INTERVAL, CustomMatcherFactory, CustomEqualityTester

I uninstalled all the jasmine and karma packages and removed the .spec.ts files and got it to build. But then npm start still wouldn't work, I think it was treating the deprecation as an error and put me back to the command line:

$ npm start

> friendly-eats-quickstart@0.0.0 start
> npm run pre-build && firebase --project demo-friendly-eats emulators:exec --import ./app-data-seed --ui 'ng serve'


> friendly-eats-quickstart@0.0.0 pre-build
> (cd functions && npm run build)


> build
> tsc

(node:25160) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Running the command from the command line did allow the emulators and application to start:

firebase --project demo-friendly-eats emulators:exec --import ./app-data-seed --ui 'ng serve'

Expected Results:

There shouldn't be errors building or running following the readme directions

Relevant Code:

npm start