Hello,
Iβm building a dapp and have already written a bunch of front-end code in NextJS. I want to start working on backend features, so I decided on Moralis + Firebase for the stack. My goal is to get the scaffolding in this project up and running: https://github.com/MoralisWeb3/Moralis-JS-SDK/tree/main/demos/firebase-nextjs
Then I can drop in all the pages/components I already built in my frontend project. However, I canβt get this firebase-nextjs project to run after following all the steps. When I run firebase emulators:start, I get the following error:
User@MacBook-Pro firebase-nextjs % firebase emulators:start
i emulators: Starting emulators: hosting, extensions
β Extensions: The following Extensions make calls to Google Cloud APIs that do not have Emulators. These calls will go to production Google Cloud APIs which may have real effects on nest-32367.
βββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββ
β API Name β Instances using this API β Enabled on nest-32367 β Enable this API β
βββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€
β iam.googleapis.com β moralis-auth β No β https://firebase.tools/l/cZwTxdncqLsWk88q8 β
βββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€
β iamcredentials.googleapis.com β moralis-auth β No β https://firebase.tools/l/fnC97DnsQjzZR9eh9 β
βββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€
β stackdriver.googleapis.com β moralis-auth β No β https://firebase.tools/l/mu933nQn7r82wtA26 β
βββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€
β monitoring.googleapis.com β moralis-auth β Yes β β
βββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€
β logging.googleapis.com β moralis-auth β Yes β β
βββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββΌββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€
β secretmanager.googleapis.com β moralis-auth β Yes β β
βββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββ΄ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββ
β Function 'requestMessage is missing a trigger in extension.yaml. Please add one, as triggers defined in code are ignored.
β Function 'issueToken is missing a trigger in extension.yaml. Please add one, as triggers defined in code are ignored.
Detected a Next.js codebase. This is an experimental integration, proceed with caution.
info - Loaded env from /Users/Salmaan/Coding/firebase-nextjs/hosting/.env
info - Downloading WASM swc package...
info - Using wasm build of next-swc
warn - Attempted to load @next/swc-darwin-x64, but it was not installed
event - compiled client and server successfully in 3.9s (204 modules)
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it!
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS: linux
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: darwin
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Salmaan/.npm/_logs/2023-03-26T22_36_54_682Z-debug.log
i emulators: Shutting down emulators.
i hub: Stopping emulator hub
Error: An unexpected error has occurred.
Not sure whatβs driving this bug as I followed all the steps. I did end up using Google Secret Manager, but I doubt thatβs causing this issue as my local .env file has all the variables copied over.
Looking for insight into how to resolve this and if Iβm taking the right approach to integrating Moralis + Firebase into my dapp.