I am trying to link react-native-firebase library based on the tutorial, and as soon as I run the command:
react-native link react-native-firebase
I get the following error:
Scanning folders for symlinks in
/Users/christkhodabakhshi/projects/FlashCard/node_modules (18ms)
rnpm-install info Linking react-native-firebase ios dependency
rnpm-install WARN ERRGROUP Group 'Libraries' does not exist in your
Xcode project. We have created it automatically for you.
rnpm-install ERR! Something went wrong while linking. Error: Cannot
read property 'children' of null
Please file an issue here: https://github.com/facebook/react-native/issues
Cannot read property 'children' of null
and the following is my package.json
"expo": "^29.0.0",
"expokit": "^1.5.0",
"firebase": "^5.3.0",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
"react-native-firebase": "^4.3.1",
Related
While running firebase emulators:start, I get this error 70% of the time:
!! functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification
But for some reason, restarting firebase emulator seems to fix that error temporarily - which leads me to believe it's not an issue with code or dependencies but more of something related to firebase emulator itself.
Any help would be appreciated.
OS & Firebase Details:
OS: Windows 11 (22H2)
Node Version: 18
Firebase CLI Version: 11.18.0
Firebase dependencies:
"firebase": "^9.16.0",
"firebase-admin": "^10.0.1",
"firebase-functions": "^4.2.0",
"firebase-tools": "^11.18.0",
I using expo 3.27.10 and node v12.18.4 below is package info I tried to install firebase using expo and npm both fails then how I initialize firebase config file
firebase.initializeApp(firebaseConfig);
firebase.analytics();
and package.json is
"dependencies": {
"#react-native-community/masked-view": "0.1.10",
"#react-native-firebase/analytics": "^7.6.4",
"#react-native-firebase/app": "^8.4.3",
"#react-native-firebase/auth": "^9.2.3",
"#react-navigation/native": "^5.7.4",
"#react-navigation/stack": "^5.9.1",
"expo": "~39.0.2",
"expo-status-bar": "~1.0.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.2.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"react-native-web": "~0.13.12",
"firebase": "7.9.0"
},
For me I have to change node version current 14.13 to LTS 12.18 and this allows me to install firebase
If: expo install firebase
isn't work for you and you got an Error,
That maybe you are having an old npm version uou need to update your npm
npm update
Or you got error for installation that because FIREBASE made update so to fix it use
yarn add firebase
see more: https://www.npmjs.com/package/firebase
I had a similar issue. What I did:
- remove firebase from the package.json.
- npm update
- npm install
- npm install --save firebase
afterwards had to change import * as firebase from 'firebase' to
import firebase from 'firebase'
if(firebase.apps.length === 0){
firebase.initializeApp(firebaseConfig)
}
p.s: working with VSCode, node v14.15.1, firebase 8.2.7
Downloading 2019 visual studio tools solved the error for me. You can scroll down and download only 2019 tools if you don't Want Visual Studio.
Click the link to download here
I've been unable to deploy a Next.js app via ZEIT Now due to a Gun.js reference error, OSSL_WEBCRYPTO_OR_TEXT_ENCODING_NOT_INSTALLED is not defined. There are no errors when running in development mode on my local machine.
Just prior to the error in the deployment logs is the message "node-webcrypto-ossl and text-encoding may not be included by default, please add it to your package.json!" Doing so did not fix the error, nor did adding #trust/webcrypto as per https://github.com/amark/gun#additional-cryptography-libraries (I'm using SEA for user authentication) (EDIT: removed #trust/webcrypto from dependencies).
Stack trace from Now deployment logs:
Compiled with warnings.
./node_modules/gun/gun.js
Critical dependency: the request of a dependency is an expression
./node_modules/gun/sea.js
Critical dependency: the request of a dependency is an expression
./node_modules/gun/gun.js
Critical dependency: the request of a dependency is an expression
./node_modules/gun/sea.js
Critical dependency: the request of a dependency is an expression
Hello wonderful person! :) Thanks for using GUN, feel free to ask for help on https://gitter.im/amark/gun and ask StackOverflow questions tagged with 'gun'!
node-webcrypto-ossl and text-encoding may not be included by default, please add it to your package.json!
> Build error occurred
ReferenceError: OSSL_WEBCRYPTO_OR_TEXT_ENCODING_NOT_INSTALLED is not defined
at /tmp/173ebd33/.next/serverless/pages/index.js:13474:7
at /tmp/173ebd33/.next/serverless/pages/index.js:13301:7
at /tmp/173ebd33/.next/serverless/pages/index.js:13478:5
at Object.<anonymous> (/tmp/173ebd33/.next/serverless/pages/index.js:14596:2)
at Object.md/m (/tmp/173ebd33/.next/serverless/pages/index.js:14597:30)
at __webpack_require__ (/tmp/173ebd33/.next/serverless/pages/index.js:23:31)
at Object.1TCz (/tmp/173ebd33/.next/serverless/pages/index.js:865:11)
at __webpack_require__ (/tmp/173ebd33/.next/serverless/pages/index.js:23:31)
at Module.VVmT (/tmp/173ebd33/.next/serverless/pages/index.js:11281:12)
at __webpack_require__ (/tmp/173ebd33/.next/serverless/pages/index.js:23:31)
at /tmp/173ebd33/.next/serverless/pages/index.js:91:18
at Object.<anonymous> (/tmp/173ebd33/.next/serverless/pages/index.js:94:10)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
npm
ERR! code ELIFECYCLE
npm
ERR! errno 1
npm
ERR! maptivist#1.0.0 now-build: `next build`
npm ERR!
Exit status 1
npm ERR!
npm ERR! Failed at the maptivist#1.0.0 now-build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
package.json dependencies:
{
"dependencies": {
"directory-named-webpack-plugin": "^4.0.1",
"gun": "^0.2019.726",
"mapbox-gl": "^1.2.1",
"next": "^9.0.3",
"next-offline": "^4.0.3",
"node-webcrypto-ossl": "^1.0.48",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"styled-components": "^4.3.2",
"text-encoding": "^0.7.0"
}
}
node-webcrypto-ossl-related stuff in package-lock.json:
...
"gun": {
"version": "0.2019.726",
"resolved": "https://registry.npmjs.org/gun/-/gun-0.2019.726.tgz",
"integrity": "sha512-LVSxhGwaemZbrirSk6fp2KXORLUyjs6bnssjSjl/OhwbfLv7fvMhNfaOZuorzYsehxqMKJvxyNdFq/mZNXpjHQ==",
"requires": {
"emailjs": "^2.2.0",
"node-webcrypto-ossl": "^1.0.47",
"text-encoding": "^0.7.0",
"ws": "~>7.1.0"
}
},
...
"node-webcrypto-ossl": {
"version": "1.0.48",
"resolved": "https://registry.npmjs.org/node-webcrypto-ossl/-/node-webcrypto-ossl-1.0.48.tgz",
"integrity": "sha512-MWUkQ/5wrs7lpAr+fhsLMfjdxKGd3dQFVqWbNMkyYyCMRW8E7ScailqtCZYDLTnJtU6B+91rXxCJNyZvbYaSOg==",
"requires": {
"mkdirp": "^0.5.1",
"nan": "^2.13.2",
"tslib": "^1.9.3",
"webcrypto-core": "^0.1.26"
}
},
...
node-webcrypto-ossl is visible in node_modules.
Please help! :-)
#randy-morantes your package.json looks correct.
Could you try to share:
The stacktrace of the error.
Your server code that calls gun that causes this problem.
I am an author of the peculiar\webcrypto and node-webcrypto-ossl packages. Based on the source of gun:
https://github.com/amark/gun/blob/e0d85f02b567a43d39cda0fe71522b84ff52a08b/sea/shim.js#L25
It looks like they have not switched to peculiar\webcrypto yet. Try adding node-webcrypto-ossl to your package.json.
The latest version of Next.js ("next": "9.0.4", "next-offline": "4.0.5") fixed the issue!
I've encountered this problem last night and finally successfully fixed it using some monkey-patch and hack around. The trick is taking gun and sea out of the webpack and react environment, then access it using window.gun. Also, gun seems running faster when it is not in webpack.
This is how I did it in my Gatsbyjs project:
Read this doc: https://www.gatsbyjs.org/docs/custom-html/
Copy ./cache/default-html.js to ./src/html.js
Now start gun and sea in the of html.js. You can load external js file from github or jsdelivr here.
Then in your gatsby react components, just call window.gun and window.user and enjoy hacking:
if (window) gun...
Now run gatsby build and you can see it is built without error.
I am currently work on web project using Angular 5 and I want to integrate the Firebase Cloud Messaging to send notification on app, bt I faced to a lot of problems that I tried to fix them. Right now there two errors that I'm not able to fix concerning: Namespace 'firebase.auth' and functions
The errors look like:
ERROR in node_modules/angularfire2/auth/auth.d.ts(12,45): error TS2694: Namespace 'firebase.auth' has no exported member 'IdTokenResult'.
node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"/Users/gerardtalla/dev/workspaces/ws-parcaune/pms/pms-frontend-2018/node_modules/firebase/app/index"' has no exported member 'functions'.
How can I fix that? I'm using
Angular 5
"firebase": "4.8.0"
"angularfire2": "^5.0.0-rc.5"
"#angular/cli": "~1.7.3"
if someone has an idea do not hesitate please share with me. Thank a lot in advance.
just use "angularfire2": "5.0.0-rc.5" instead of "angularfire2": "^5.0.0-rc.5"
Run the following command:
npm i --save firebase#latest angularfire2#latest
It is version compatible issue, you can read
AngularFirebase2 Changelog
5.0.0-rc.9 (2018-05-16)
auth: Adding user and idTokenResult Observables to AngularFireAuth (#1642) (31045a9)
"angularfire2": "5.0.0-rc.6",
"firebase": "4.9.0",
I resolve this issue by making this change in package.json.
mostly it is the version problem
make this change in package.json
"angularfire2": "5.0.0-rc.6",
"firebase": "4.9.0"
These should solve the problem
I fixed it with this.
"firebase": "^5.7.0",
"angularfire2": "5.0.0-rc.6",
I got the same error, remove folder in node_modules and reinstall firebase fixed my problem.
npm install --save firebase
mostly it is the version problem, check version using npm list, or try downgrade to the following the error should gone
angular: 4
angularfire2: "^5.0.0-rc.3"
firebase: "4.13.1"
Try this out
npm install --save firebase #angular/fire -f
edit - There is something strange: mongo appears in both package.json and in .meteor/packages files (should it appear in package.json at all?? it wasn't there before the update) but in different versions. here is my package.json:
{
"name": "something",
"version": "1.1.1",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"#babel/runtime": "^7.0.0-beta.49",
"babel-runtime": "^6.26.0",
"bootstrap": "^3.3.7",
"google-protobuf": "^3.5.0",
"grpc": "^1.12.2",
"grpc-tools": "^1.6.6",
"meteor-node-stubs": "^0.3.3",
**"mongodb": "^3.1.0-beta4",**
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-progressbar.js": "^0.2.0",
"react-router": "^3.2.1",
"react-router-dom": "^4.2.2"
}
}
and here is my .meteor/packages:
meteor-base#1.3.0 # Packages every Meteor app needs to have
mobile-experience#1.0.5 # Packages for a great mobile UX
**mongo#1.4.2 # The database Meteor supports right now**
blaze-html-templates#1.0.4 # Compile .html files into Meteor Blaze views
reactive-var#1.0.11 # Reactive variable for tracker
tracker#1.1.3 # Meteor's client-side reactive programming library
standard-minifier-css#1.4.0 # CSS minifier run for production mode
standard-minifier-js#2.3.1 # JS minifier run for production mode
es5-shim#4.7.0 # ECMAScript 5 compatibility for older browsers
ecmascript#0.10.6 # Enable ECMAScript2015+ syntax in app code
shell-server#0.3.1 # Server-side component of the `meteor shell` command
session#1.1.7
tarang:ssl
After updating to 1.6.1.1, my app won’t run, crashing with message 'Error: Cannot find module “mongodb” '.
Tried to run meteor npm install, even took away the entire node_modules folder and built it again.
Tried to run meteor npm update.
Tried to run meteor npm install mongodb.
Tried to downgrade back to version 1.6.0.1.
Still can’t find mongodb.
Important - mongodb is there, all collections are there - I can access it through the terminal with "meteor mongo".
Any help?
If it helps - The data in the db can be erased if there is no other way.
(running on ubuntu 16.04)
Thanks
In the end, the problem was not in the project but in meteor globally, so I uninstalled and re-installed meteor globally, and everything got back to normal…
Thank you all!