Meteor not running showing issue with node-fiber - meteor

I have a meteor project. It was running two days before. Now I am getting the following error.
## There is an issue with `node-fibers` ##
W20181017-19:00:42.197(7)? (STDERR)
D:\Work\store\node_modules\fibers\bin\win32-x64-57\fibers.node`
is missing.
(STDERR) Try running this to fix the issue:
C:\Users\mritu\AppData\Local\.met
eor\packages\meteor-tool\1.6.0_1\mt-os.windows.x86_64\dev_bundle\bin\node.exe
D:\Work\store\node_modules
\fibers/build
W20181017-19:00:42.199(7)? (STDERR)
D:\Work\store\node_modules\fibers\fibers.js:20
W20181017-19:00:42.199(7)? (STDERR) throw new Error('Missing binary. See
message above.');
W20181017-19:00:42.199(7)? (STDERR) ^
W20181017-19:00:42.199(7)? (STDERR)
W20181017-19:00:42.200(7)? (STDERR) Error: Missing binary. See message above.
W20181017-19:00:42.200(7)? (STDERR) at Object.<anonymous>
(D:\Work\store\node_modules\fibers\fibers.
js:20:8)
W20181017-19:00:42.200(7)? (STDERR) at Module._compile (module.js:635:30)
W20181017-19:00:42.201(7)? (STDERR) at Object.Module._extensions..js
My package.json is
{
"name": "frontstore",
"private": true,
"dependencies": {
"babel-runtime": "^6.23.0",
"bcrypt": "^1.0.2",
"fibers": "^1.0.15",
"jquery": "^2.2.4",
"lodash": "^4.17.3",
"mailchimp-api-v3": "^1.7.0",
"md5": "^2.2.1",
"meteor-node-stubs": "~0.2.0",
"meteor-react-autoform": "^0.3.0",
"mobile-detect": "^1.3.5",
"moment": "*",
"moment-range": "^2.2.0",
"omise": "^0.5.3",
"prop-types": "^15.5.8",
"react": "^15.3.1",
"react-addons-css-transition-group": "^15.4.2",
"react-addons-pure-render-mixin": "^15.3.2",
"react-bootstrap": "^0.30.3",
"react-burger-menu": "^1.10.9",
"react-date-range": "github:bchurunway/datepicker",
"react-day-picker": "^2.5.0",
"react-dom": "^15.3.1",
"react-helmet": "^5.2.0",
"react-html-parser": "^1.0.3",
"react-infinite-scroll-component": "^2.2.2",
"react-lazy-load": "^3.0.11",
"react-lazyload": "^2.2.7",
"react-loading": "0.0.9",
"react-mounter": "github:bchurunway/react-mounter",
"react-notification-system": "^0.2.11",
"react-number-format": "^1.0.0",
"react-player": "^0.14.3",
"react-radio-group": "^3.0.1",
"react-select": "^2.0.0",
"react-share": "^1.12.1",
"react-slick": "0.14.5",
"react-stars": "^2.2.5",
"react-structured-data": "^0.0.7",
"react-tooltip": "^3.2.7",
"simpl-schema": "^1.4.1",
"twix": "^1.2.1"
},
"devDependencies": {
"babel-plugin-transform-class-properties": "^6.23.0",
"babel-preset-stage-3": "^6.22.0"
}
}
My meteor version is 1.6.1. I have tried many ways like deleting node_modules and install it again, delete local folder from meteor and regain it again using meteor command. But nothing works.

Related

Class constructor TranslateLoader cannot be invoked without 'new' --- error is showing while running jest test in angular 12

Class constructor TranslateLoader cannot be invoked without 'new' --- error is showing while running jest test in angular 12, please someone help me.
"devDependencies": {
"#angular-devkit/build-angular": "~12.0.0",
"#angular/cli": "~12.0.0",
"#angular/compiler-cli": "~12.0.0",
"#fullhuman/postcss-purgecss": "^5.0.0",
"#types/jest": "^29.2.0",
"#types/node": "^12.11.1",
"cssnano": "^5.1.13",
"jest": "^29.2.1",
"jest-preset-angular": "^12.2.2",
"jscat": "0.0.2",
"ngx-translate-testing": "^5.2.0",
"postcss": "^8.4.17",
"postcss-loader": "^7.0.1",
"postcss-preset-env": "^7.8.2",
"postcss-scss": "^4.0.5",
"sass": "^1.55.0",
"typescript": "~4.2.3"
}
Error log:
TypeError: Class constructor TranslateLoader cannot be invoked without 'new'
at new TestTranslateLoader (projects/testing/src/lib/test-translate-loader.service.ts:23:5)
at TranslateTestingModule.get (projects/testing/src/lib/testing.module.ts:95:7)
at R3Injector.Object.<anonymous>.R3Injector.processInjectorType (../packages/core/src/di/r3_injector.ts:366:61)
at ../packages/core/src/di/r3_injector.ts:326:20
at ../packages/core/src/util/array_utils.ts:71:74
at Array.forEach (<anonymous>)
at deepForEach (../packages/core/src/util/array_utils.ts:71:9)
at ../packages/core/src/util/array_utils.ts:71:49
at Array.forEach (<anonymous>)
at deepForEach (../packages/core/src/util/array_utils.ts:71:9)
at ../packages/core/src/util/array_utils.ts:71:49
at Array.forEach (<anonymous>)
at deepForEach (../packages/core/src/util/array_utils.ts:71:9)
at R3Injector.Object.<anonymous>.R3Injector.processInjectorType (../packages/core/src/di/r3_injector.ts:325:9)
at ../packages/core/src/di/r3_injector.ts:147:44
at ../packages/core/src/util/array_utils.ts:71:74
at Array.forEach (<anonymous>)
at deepForEach (../packages/core/src/util/array_utils.ts:71:9)
at new R3Injector (../packages/core/src/di/r3_injector.ts:147:5)
at createInjectorWithoutInjectorInstances (../packages/core/src/di/r3_injector.ts:97:10)
at new NgModuleRef$1 (../packages/core/src/render3/ng_module_ref.ts:54:24)
at R3TestBedCompiler.Object.<anonymous>.R3TestBedCompiler.finalize (../packages/core/testing/src/r3_test_bed_compiler.ts:260:26)
at TestBedRender3.get (../packages/core/testing/src/r3_test_bed.ts:370:43)
at TestBedRender3.Object.<anonymous>.TestBedRender3.inject (../packages/core/testing/src/r3_test_bed.ts:268:25)
at TestBedRender3.Object.<anonymous>.TestBedRender3.createComponent (../packages/core/testing/src/r3_test_bed.ts:325:40)
at Function.Object.<anonymous>.TestBedRender3.createComponent (../packages/core/testing/src/r3_test_bed.ts:177:33)
at src/app/shared/components/translate/translate.component.spec.ts:23:23
at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:409:30)
at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:3830:43)
at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:408:56)
at Zone.Object.<anonymous>.Zone.run (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:169:47)
at Object.wrappedFunc (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:4330:34)

Expo - React Native Firebase - Native module cannot be null

I installed #react-native-firebase/auth and I get all the time these errors
Invariant Violation: Native module cannot be null.
... 9 more stack frames from framework internals
Invariant Violation: "main" has not been registered. This can happen
if:
Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent wasn't called. at
node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in
reportException at
node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19
in handleException at
node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in
handleError at
node_modules/#react-native/polyfills/error-guard.js:49:36 in
ErrorUtils.reportFatalError
I already googled a lot, pod installed, linked manually, removed, what ever it took.
Anyone knows how to fix it?
{
...
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#apollo/client": "^3.5.8",
"#babel/cli": "^7.16.7",
"#expo/react-native-action-sheet": "^3.13.0",
"#firebase/auth": "^0.19.4",
"#invertase/react-native-apple-authentication": "^2.1.5",
"#react-native-community/masked-view": "^0.1.11",
"#react-native-firebase/app": "^14.5.0",
"#react-native-firebase/auth": "^14.5.0",
"#react-native-picker/picker": "2.2.1",
"#react-navigation/bottom-tabs": "^6.0.9",
"#react-navigation/core": "^6.1.0",
"#react-navigation/native": "^6.0.8",
"#react-navigation/stack": "^6.0.11",
"axios": "^0.24.0",
"babel-plugin-module-resolver": "^4.1.0",
"expo": "~44.0.0",
"expo-apple-authentication": "~4.1.0",
"expo-av": "~10.2.0",
"expo-constants": "~13.0.1",
"expo-crypto": "~10.1.1",
"expo-font": "~10.0.4",
"expo-image-picker": "~12.0.1",
"expo-linear-gradient": "~11.0.3",
"expo-linking": "~3.0.0",
"expo-splash-screen": "~0.14.1",
"expo-status-bar": "~1.2.0",
"firebase": "^9.6.1",
"formik": "^2.2.9",
"graphql": "^16.2.0",
"moment": "^2.29.1",
"native-base": "^3.3.4",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-circular-progress": "^1.3.7",
"react-native-dotenv": "^3.3.1",
"react-native-draggable-flatlist": "^3.0.4",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "^2.2.0",
"react-native-pager-view": "5.4.9",
"react-native-parallax-scroll-view": "^0.21.3",
"react-native-progress": "^5.0.0",
"react-native-reanimated": "^2.4.1",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "12.1.1",
"react-native-tab-view": "^3.1.1",
"react-native-web": "0.17.1",
"rn-tourguide": "^3.2.0",
"styled-components": "^5.3.3",
"yup": "^0.32.11"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/react": "~17.0.21",
"#types/react-native": "~0.64.12",
"typescript": "~4.3.5"
},
"private": true
}
Updated: 17.02.2022 So everyone how is facing this issues, I got the answer to clarify that Expo Go doesn't support native modules. So it wasn't rather the issue itself but more with Expo. It is recommended to switch to EAS build and not more Expo Go.

React Native build failed - "Error: While trying to resolve module `react-native-firebase`"

I am upgrading from RN 0.55.3 to 0.57.0 (manually).
After running react-native run-ios or react-native run-android I'm now getting the error:
error: bundling failed: Error: While trying to resolve module `react-native-firebase`
I already tried re-running react-native link react-native-firebase (per this post) as well as deleting node_modules and re-running yarn and neither worked.
Full error report:
error: bundling failed: Error: While trying to resolve module `react-native-firebase` from file `MyApp/src/screens/StarterPage.js`, the package `MyApp/node_modules/react-native-firebase/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`MyApp/node_modules/react-native-firebase/dist/index.js`. Indeed, none of these files exist:
* `MyApp/node_modules/react-native-firebase/dist/index.js(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
* `MyApp/node_modules/react-native-firebase/dist/index.js/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
at ResolutionRequest.resolveDependency (MyApp/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:95:15)
at DependencyGraph.resolveDependency (MyApp/node_modules/metro/src/node-haste/DependencyGraph.js:238:485)
at Object.resolve (MyApp/node_modules/metro/src/lib/transformHelpers.js:180:25)
at dependencies.map.result (MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:311:29)
at Array.map (<anonymous>)
at resolveDependencies (MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:307:16)
at MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:164:33
at Generator.next (<anonymous>)
at step (MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:266:307)
at MyApp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:266:467
BUNDLE [ios, dev] ../../index.js ▓▓▓▓▓▓▓▓▓▓▓░░░░░ 73.4% (796/929)::1 - - [04/Jun/2019:00:27:03 +0000] "GET /index.bundle?platform=ios&dev=true&minify=false HTTP/1.1" 200 - "-" "MyApp/79 CFNetwork/978.0.7 Darwin/18.6.0"
BUNDLE [ios, dev] ../../index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ 92.7% (904/939)
I checked and all these files are in node_modules/react-native-firebase. For instance, /dist/index.js is:
import firebase from './modules/core/firebase';
export default firebase;
export * from './modules/core/firebase';
/*
* Export App types
*/
My package.json
{
"name": "MyApp",
"version": "2.1.27",
"private": true,
"scripts": {
"clean:android": "./android/gradlew -p android/ clean && git clean -dfX -e *.iml android/build android/app/src",
"bundle:android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
"build:android:release": "yarn clean:android && yarn bundle:android && ./android/gradlew -p android/ assembleRelease",
"run:android:release": "react-native run-android --variant=release",
"run:android:debug": "react-native run-android",
"test": "jest",
"android-linux": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android",
"eslint": "eslint —-ext .js ./src/",
"eslint:fix": "eslint --fix ./src/",
"flow": "flow",
"flow-stop": "flow stop",
"postinstall": "sed -i '' \"s/version.startsWith('iOS')/version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS')/g\" ./node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js"
},
"dependencies": {
"#babel/runtime": "^7.4.5",
"#react-native-community/async-storage": "^1.3.3",
"adm-zip": "^0.4.11",
"axios": "^0.18.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"base-64": "^0.1.0",
"d3-format": "^1.3.0",
"hoist-non-react-statics": "^3.0.1",
"lodash": "^4.17.11",
"moment": "^2.22.2",
"moment-timezone": "^0.5.17",
"piexifjs": "^2.0.0-beta.7",
"plist": "^3.0.1",
"prop-types": "^15.6.2",
"react": "16.5.0",
"react-native": "0.57.0",
"react-native-animatable": "^1.3.0",
"react-native-camera": "^1.6.3",
"react-native-carrier-info": "^1.0.1",
"react-native-circular-progress": "git+https://git#github.com/bartgryszko/react-native-circular-progress.git",
"react-native-confetti": "^0.1.0",
"react-native-contacts": "^2.2.3",
"react-native-country-picker-modal": "^0.5.1",
"react-native-datepicker": "^1.7.2",
"react-native-default-preference": "^1.3.1",
"react-native-device-info": "^0.21.5",
"react-native-dotenv": "^0.2.0",
"react-native-extended-stylesheet": "^0.8.1",
"react-native-fbsdk": "^0.8.0",
"react-native-firebase": "5.2.0",
"react-native-fs": "^2.13.3",
"react-native-image-crop-picker": "^0.24.0",
"react-native-keyboard-aware-scrollview": "^2.0.0",
"react-native-localization": "1.0.9",
"react-native-maps": "^0.22.1",
"react-native-mixpanel": "^1.1.1",
"react-native-modalbox": "^1.4.2",
"react-native-permissions": "^1.1.1",
"react-native-popover-tooltip": "^1.1.4",
"react-native-popup-menu": "^0.14.0",
"react-native-share": "^1.1.3",
"react-native-snap-carousel": "^3.7.5",
"react-native-sound": "^0.10.9",
"react-native-svg": "^9.2.4",
"react-native-svg-charts": "^5.2.0",
"react-native-swiper": "^1.5.13",
"react-native-version-number": "^0.3.4",
"react-native-webview-android-file-upload": "git+https://git#github.com/andreipfeiffer/react-native-webview-android-file-upload.git",
"react-navigation": "^1.5.11",
"xcode": "^1.0.0"
},
"devDependencies": {
"babel-jest": "24.7.1",
"babel-preset-react-native": "5.0.2",
"eslint-config-rallycoding": "^3.2.0",
"flow-bin": "^0.67.1",
"jest": "24.7.1",
"metro-react-native-babel-preset": "0.53.1",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./assets/fonts/"
]
}
}
I expect my app to run in the emulator (iOS) or on my phone (Android).
Have you tried resetting the watchman and Metro Bundler caches?
watchman watch-del-all
react-native start --reset-cache

Get BrowserslistError: Unknown browser query `dead` when try to compile the react application

I use in my project react template - React Isomorphic Redux Admin Dashboard
Try to compile the react app with this template:
1. npm install yarn install
2. npm run build dev or yarn run build
and every time I get this error when use yarn for instance:
yarn run v1.13.0
$ node build && node copy
Creating an optimized production build...
Failed to compile.
./node_modules/nprogress/nprogress.css
Module build failed: BrowserslistError: Unknown browser query dead
at Array.forEach ()
BrowserslistError when try to compile the react app with yarn
When I use npm I get the same error, but with different ....css file.
Here img of error with npm
BrowserslistError when try to compile the react app with npm
isomorphic#2.9.3 build /Users/romank/code/instagram/public
node build && node copy "dev"
Creating an optimized production build...
Failed to compile.
./src/containers/App/global.css
Module build failed: BrowserslistError: Unknown browser query dead
at Array.forEach ()
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! isomorphic#2.9.3 build: node build && node copy "dev"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the isomorphic#2.9.3 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/romank/.npm/_logs/2019-02-21T15_10_28_618Z-debug.log
Here is my package.json :
{
"name": "isomorphic",
"version": "2.9.3",
"private": true,
"dependencies": {
"antd": "^3.6.5",
"antd-local-icon": "^0.1.3",
"auth0-lock": "^11.1.2",
"autoprefixer": "7.1.6",
"babel-core": "6.26.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "^8.0.2",
"babel-preset-react-app": "^3.1.0",
"babel-runtime": "6.26.0",
"card-react": "^1.2.7",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"chart.js": "^2.5.0",
"classnames": "^2.2.5",
"clone": "^2.1.1",
"cp": "^0.2.0",
"cp-cli": "^1.1.2",
"cp-file": "^6.0.0",
"cp-folder": "^1.0.8",
"css-loader": "0.28.7",
"d3-shape": "^1.0.6",
"dotenv": "4.0.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-react-intl": "^1.4.8",
"eslint": "4.10.0",
"eslint-config-react-app": "^2.0.1",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.39.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.4.0",
"express": "^4.15.3",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.5",
"firebase": "^5.2.0",
"fixed-data-table-2": "^0.8.8",
"frappe-charts": "^0.0.8",
"fs-extra": "^7.0.0",
"globalize": "^1.2.3",
"history": "^4.6.3",
"html-webpack-plugin": "2.29.0",
"immutable": "^3.8.1",
"immutable-devtools": "^0.0.7",
"jest": "20.0.4",
"js-info-bubble": "git+https://github.com/RedQ/js-info-bubble.git",
"js-rich-marker": "^1.1.2",
"lodash": "^4.17.4",
"moment": "^2.18.1",
"nprogress": "^0.2.0",
"object-assign": "4.1.1",
"polished": "^1.7.0",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-inline-rtl": "^0.9.8",
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"prop-types": "^15.5.10",
"raf": "3.4.0",
"react": "^16.2.0",
"react-addons-shallow-compare": "^15.5.2",
"react-big-calendar": "^0.17.0",
"react-chartjs-2": "^2.5.7",
"react-codemirror": "^1.0.0",
"react-count-down": "^1.1.0",
"react-dates": "12.2.4",
"react-dev-utils": "^4.2.1",
"react-dnd": "^2.3.0",
"react-dnd-html5-backend": "^2.3.0",
"react-dom": "^16.2.0",
"react-drawer": "^1.2.5",
"react-dropzone-component": "^3.0.0",
"react-element-resize": "^0.2.1",
"react-error-overlay": "1.0.6",
"react-flexbox-grid": "^2.0.0",
"react-flip-move": "^2.9.2",
"react-google-charts": "^1.6.0",
"react-grid-layout": "^0.16.2",
"react-instantsearch": "^4.0.7",
"react-intl": "^2.3.0",
"react-ladda": "^5.0.6",
"react-motion-drawer": "^2.1.7",
"react-perfect-scrollbar": "^0.2.0",
"react-placeholder": "^2.0.0",
"react-quill": "^1.2.0",
"react-redux": "^5.0.4",
"react-router": "^4.1.1",
"react-router-dom": "^4.1.0",
"react-router-redux": "^5.0.0-alpha.5",
"react-sidebar": "^2.3.2",
"react-smooth-scrollbar": "^8.0.6",
"react-speech-recognition": "^1.0.4",
"react-tag-input": "^4.7.2",
"react-tags": "^0.2.2",
"react-test-renderer": "^16.2.0",
"react-throttle": "^0.3.0",
"react-trend": "^1.2.3",
"react-vis": "^1.7.2",
"react-window-size-listener": "^1.0.10",
"react-yandex-maps": "^2.3.0",
"react-youtube": "^7.4.0",
"recharts": "^1.0.0-alpha.2",
"redux": "^3.6.0",
"redux-devtools": "^3.3.2",
"redux-devtools-dock-monitor": "^1.1.1",
"redux-devtools-log-monitor": "^1.2.0",
"redux-logger": "^3.0.6",
"redux-saga": "^0.16.0",
"redux-saga-firebase": "0.10.0",
"redux-thunk": "^2.2.0",
"reselect": "^3.0.0",
"rheostat": "^2.1.1",
"rich-marker": "^0.0.1",
"smooth-scrollbar": "^8.2.5",
"style-loader": "0.19.0",
"styled-components": "^2.2.1",
"styled-theme": "^0.3.3",
"sw-precache-webpack-plugin": "0.11.4",
"uppy": "^0.30.0",
"url-loader": "0.6.2",
"webpack": "3.8.1",
"webpack-dev-server": "2.9.4",
"webpack-manifest-plugin": "1.3.2",
"whatwg-fetch": "2.0.3",
"yandex-map-react": "^1.1.1"
},
"devDependencies": {
"#babel/core": "^7.1.0",
"#babel/plugin-proposal-class-properties": "^7.1.0",
"#babel/plugin-syntax-dynamic-import": "^7.0.0",
"#babel/preset-env": "^7.1.0",
"#babel/preset-react": "^7.0.0",
"babel-polyfill": "^6.26.0",
"enzyme": "^3.2.0",
"enzyme-to-json": "^3.3.0",
"fs-extra": "^7.0.0",
"google-maps-react": "^1.1.0",
"leaflet": "^1.2.0",
"leaflet-routing-machine": "^3.2.5",
"leaflet.markercluster": "^1.0.6",
"mv": "^2.1.1",
"react-app-rewired": "1.4.0",
"redux-mock-store": "^1.2.3",
"webpack-php-loader": "^0.5.0"
},
"scripts": {
"build": "node build && node copy"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,mjs}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
},
"moduleFileExtensions": [
"web.js",
"mjs",
"js",
"json",
"web.jsx",
"jsx",
"node"
]
},
"eslintConfig": {
"extends": "react-app"
}
}
How can I fix this error? Did anyone face to this problem?
By the way, how do better run the npm and yarn commands with sudo or without?
Thank you.

Nativescript Firebase plugin - “cannot read property of null” after upgrade to NS 3.4.0

My angular - Nativescript project uses the Nativescript-Firebase-Plugin. It works perfectly well in Nativescript 3.3
I upgraded my project to Nativescript 3.4. After upgrading the project, I am facing a major issue with all firebase queries.
**JS: Error in firebase.query: TypeError: Cannot read property 'child' of null**
JS: NO QUESTIONS FOR THIS USER
JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'length' of undefined
JS: TypeError: Cannot read property 'length' of undefined
JS: at file:///data/data/org.nativescript.qbank/files/app/feed/alphaCreate.component.js:55:23
JS: at SafeSubscriber.schedulerFn [as _next] (file:///data/data/org.nativescript.qbank/files/app/tns_modules/#angular/core/bundles/core.umd.js:3870:36)
JS: at SafeSubscriber.__tryOrUnsub (file:///data/data/org.nativescript.qbank/files/app/tns_modules/rxjs/Subscriber.js:238:16)
JS: at SafeSubscriber.next (file:///data/data/org.nativescript.qbank/files/app/tns_modules/rxjs/Subscriber.js:185:22)
JS: at Subscriber._next (file:///data/data/org.nativescript.qbank/files/app/tns_modules/rxjs/Subscriber.js:125:26)
JS: at Subscriber.next (file:///data/data/org.nativescript.qbank/files/app/tns_modules/rxjs/Subscriber.js:89:18)
JS: at EventEmitter.Subject.next (file:///data/data/org.nativescript.qbank/files/app/tns_modules/rxjs/Subject.js:55:25)
JS: at EventEmitter.emit (file:///data/data/org.nativescript.qbank/files/app/tns_modules/#angular/core/bundles/core.umd.js:3844:76)
JS: at file:///data/data/org.nativescript.qbank/files/app/services/my-questions.service.js:51:42
JS: at ZoneDelegate.invoke (file:///data/data/org.nativescript.qbank/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:365:26)
JS: at Object.onInvoke (file:///data/data/org.nativescript.qbank/files/app/tns_modules/#angular/core/bundles/core.umd.js:4156:37)
JS: at ZoneDelegate.invoke (file:///data/data/org.nativescript.qbank/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:364:32)
JS: at Zone.run (file:///data/data/org.nativescript.qbank/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:125:43)
JS: at file:///data/data/org.nativescript.qbank/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:760:57
JS: at ZoneDelegate.invokeTask (file:///data/data/org.nativescript.qbank/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:398:31)
I tried to resolve it by
a. upgrading the native script firebase plugin: 5.0.5
b. upgrading all the dependenices of the project
But the issue is still occurring. This is a big blocker, and Please suggest what I can do to fix this.
My package json is as below:
{
"android": {
"markingMode": "none"
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.qbank",
"tns-ios": {
"version": "3.4.0"
},
"tns-android": {
"version": "3.4.0"
}
},
"dependencies": {
"#angular/animations": "~5.0.0",
"#angular/common": "~5.0.0",
"#angular/compiler": "~5.0.0",
"#angular/core": "~5.0.0",
"#angular/forms": "~5.0.0",
"#angular/http": "~5.0.0",
"#angular/platform-browser": "~5.0.0",
"#angular/platform-browser-dynamic": "~5.0.0",
"#angular/router": "~5.0.0",
"nativescript-algolia": "0.0.4",
"nativescript-angular": "~5.0.0",
"nativescript-camera": "^3.1.4",
"nativescript-email": "^1.5.1",
"nativescript-fancyalert": "^1.1.2",
"nativescript-filter-select": "^1.2.1",
"nativescript-geolocation": "^3.0.0",
"nativescript-gif": "^1.0.9",
"nativescript-imagepicker": "^4.0.1",
"nativescript-iqkeyboardmanager": "^1.1.0",
"nativescript-loading-indicator": "^2.3.2",
"nativescript-plugin-firebase": "^5.0.5",
"nativescript-pro-ui": "^3.3.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.5",
"nativescript-web-image-cache": "^4.2.2",
"reflect-metadata": "~0.1.8",
"rxjs": "^5.5.0",
"tns-core-modules": "^3.4.0"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "~4.0.2",
"es6-promise-loader": "^1.0.2",
"lazy": "1.0.11",
"nativescript-dev-typescript": "^0.6.0",
"tslint": "^5.1.0",
"typescript": "~2.4.2",
"zone.js": "^0.8.4"
}
}
The problem was that firebase was not initialising. I solved this by putting firebase init in a timeout.

Resources