I'm trying to push to cloud functions for my iOS app. I followed the Firebase does and installed node in my folder but now I'm getting this error trying to push it up
Error: Error parsing triggers: Cannot find module 'firebase-admin'
UPDATES
Trying to get latest firebase-admin returns invalid
Running npm uninstall firebase-admin
and then running npm install firebase-admin puts out these errors...
I got a similar issue in my project. I solved it by removing the node_modules folder with rm -rf node_modules, then in package.json changing manually the versions for both firebase-functions to 0.7.3 and fire-amin to 5.5.0. After that just run npm install again.
Related
I added a node module (otp-generator) to my MongoDB Realm app using the realm-cli, and it worked as expected. I'm now trying to add another node module (twilio) to my MongoDB Realm app, but for some reason it now is giving the following error message when I try to push my new node modules archive that includes both otp-generator and twilio:
push failed: failed to install dependencies: failed to transpile node_modules/otp-generator/._index.js. "otp-generator" is likely not supported yet. unknown: Unexpected character '' (1:0)
This message is very strange because the otp-generator was working perfectly fine before I installed Twilio. What's going on here?
I was able to figure out a solution myself. I just uninstalled the packages, and then reinstalled twilio before otp-generator. Here are the specific steps I did:
npm uninstall twilio
npm uninstall otp-generator
npm install twilio
npm install otp-generator
tar -czf node_modules.tar.gz node_modules/
And then I pushed my changes again to Realm, and it worked!
I'm not sure if installing twilio before otp-generator is what specifically resolved the problem, but at the very least uninstalling and reinstalling installing all node modules from scratch fixed it.
I am using the following book to build a MERN stack CRUD application. I'm having trouble installing and running graphql.
https://www.amazon.com/Pro-MERN-Stack-Development-Express-dp-1484243900/dp/1484243900/ref=mt_paperback?_encoding=UTF8&me=&qid= (published in 2019).
When I try to start the server contained in this repo https://github.com/vasansr/pro-mern-stack-2/tree/05.02-graphql-schema-file with the command npm start the app crashes and it returns an
Error: Cannot find module 'graphql/validation/rules/PossibleTypeExtensions'
I then followed some advice from a previous instance of this question on here to npm install karma-sinon-chai for the dependancies. But then I get the following error:
npm WARN apollo-graphql#0.4.4 requires a peer of graphql#^14.2.1 but none is installed. You must install peer dependencies yourself.
For me simply running npm install -g graphql fixed the problem (I had already installed Apollo globally with npm install -g apollo).
As per the error message apollo-graphql required a module from the graphql library validation/rules/PossibleTypeExtentions. The version of graphql I was using, as found by looking in my package.json, was "graphql":"^0.13.2".
I first tried to change this by changing my package.json to "^14.3.1". But after trying to install and run graphql I got the same error messages and when I looked in my package.json it had reverted back to "^0.13.2".
This may have been caused by my package.lock, locking me into that version. I then deleted package.lock, and node_modules folder.
I then ran the command nom install --save graphql#14.3.1, this worked fine.
I then just had to reinstall babel and Apollo-server-express and after this everything worked fine.
I tried running firebase serve on my local machine and gets below warning
The Cloud Functions emulator requires the module "firebase-admin" to
be installed. This package is in your package.json, but it's not
available. You probably need to run "npm install" in your functions
directory.
What I've tried from previous SO and github
npm install from folder functions
delete node_modules and re-run npm install
run npm install --save firebase-admin
SO and github references but non solved my problem
The Cloud Functions emulator requires the module "firebase-admin" to be installed
Im having trouble while serving or deploying Firebase Hosting Functions
https://github.com/firebase/firebase-tools/issues/1452
PS:
Downgrade to version 6 is not an option.
I'm running node 8 and "firebase-admin": "^8.6.0" as shown from package.json
With the help of Hiranya Jayathilaka comment above I was able to fix this. I upgraded my node from 8.5.x to 8.16.2 and run npm install firebase-tools and everything works fine.
I'm completely new to React Native and I'm following Facebook's tutorial at https://facebook.github.io/react-native/docs/getting-started using React Native CLI.
Yesterday, I've created a project successfully. Today, when I create an empty folder and run react-native init AnotherProject I get:
error Couldn't find package "#jest/environment#^24.5.0" required by "#jest/reporters#^24.5.0" on the "npm" registry.
What am I doing wrong? I'm on npm 6.7.0 and node 11.12.0.
Weird. I've ran the exact same command again, and it worked.
I'm trying to run this command to install firebase-admin: npm install firebase-admin --save
When I try to run this command, I get the following error:
ENOENT: no such file or directory, rename 'D:\MyPath\functions\node_modules\firebase-admin\node_modules\grpc\node_modules\abbrev' -> 'D:\MyPath\functions\node_modules\firebase-admin\node_modules\grpc\node_modules\.abbrev.DELETE'
I have tried reinstalling Node.js, I have tried uninstalling a previous version of Node.js, I have tried updating npm, I have tried pretty much everything online but nothing is helping. If I run the newest version of Node.js, instead of getting this error, I get the following error:
Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
I have honestly tried several GitHub threads for people with the same problem but none of their solutions have worked for me, so I am trying here. Can anybody help me with this issue?
Upon further tinkering with this, it looks like I finally solved my issue so i can finally deploy to Firebase. These are the steps I took to solve this problem:
First, I uninstalled firebase-admin using the npm uninstall firebase-admin command.
I reinstalled firebase-adming using the npm install firebase-admin command. This didn't seem to fix my issue, but you never know.
I deleted the firebase-admin directory in the node_modules directory.
I ran npm install
I installed the firebase-admin directory again, this time using npm install firebase-admin --save
I ran firebase deploy and it worked!
I don't know how many of those steps were truly necessary but in the end, it worked.
Try to install it using yarn it will get installed smoothly as I faced the same issue while using npm I ran
yarn add firebase-admin and it got easily installed