So I was working with my React Native application and had to install react-native firebase storage for image storing. So I ran npm install #react-native-firebase/storage after installing it I re-run my server and after that, I am getting this error. I don't know why I am getting this error. Kindly help me out.
Getting this error:
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
F:\Salvador\node_modules\#react-native-firebase\storage\android\src\main\java\io\invertase\firebase\storage\ReactNativeFirebaseStorageModule.java:234: error: cannot find symbol
firebaseStorage.useEmulator(host, port);
^
symbol: method useEmulator(String,int)
location: variable firebaseStorage of type FirebaseStorage
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-firebase_storage:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 12s
at makeError (F:\Salvador\node_modules\execa\index.js:174:9)
at F:\Salvador\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (F:\Salvador\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (F:\Salvador\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:186:9)
info Run CLI with --verbose flag for more details.
When I run my server I get this error
info Run CLI with --verbose flag for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Salvador#0.0.1 android: `react-native run-android`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Salvador#0.0.1 android 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! C:\Users\Home\AppData\Roaming\npm-cache\_logs\2021-06-02T14_16_46_571Z-debug.log
If anyone else is getting this error what you need to do is open your react native android folder in Android Studio and then build and run your application via Android Studio. It will successfully run the project after that close Android Studio and now again start your react native project.
Now you will get 0 errors.
Also, run npm outdated after running that try upgrading your outdated packages also as my storage version was 12.0 but auth and app of firebase was 11.2.
Related
Has anyone faced this problem? I installed the styled-components package for working on a mobile application (React Native), but when I import it in VS Code, the line is highlighted with an error saying "Failed to find declaration file for module 'styled-components/native'. path has an implicit any type". Although this code works and everything can be seen on the phone.
node_modules has everything
in the package.the json of the project itself added resolution { "styled-components": "^5"
tried installing #types/styled-components and #types/styled-components/native
I tried the installation with --save and without it. It didn't help. But when installing separately styled-components/naitve, an error appears: npm ERR! code 128, npm ERR! An unknown git error occurred, npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/styled-components/native.git, npm ERR! git#github.com: Permission denied (publickey)., npm ERR! fatal: Could not read from remote repository, npm ERR! Please make sure you have the correct access rights, npm ERR! and the repository exists.
enter image description here
I am having issues setting up react even though I have both node and npm installed.
Typing in:
npx create-react-app new-test-react --use-npm
Results in the following error:
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/#babel%2fhelper-plugin-utils failed, reason: getaddrinfo ENOTFOUND your_proxy_ip
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\abhin\AppData\Roaming\npm-cache\_logs\2021-02-03T06_40_10_273Z-debug.log
Any help will be appreciated. Thanks alot
Looks like you are behind some proxy thats why you were not able to remote registry. The error clearly says so.
network request to https://registry.npmjs.org/#babel%2fhelper-plugin-utils failed, reason: getaddrinfo ENOTFOUND your_proxy_ip
Set the proxy config properly with these commands
$ npm config set proxy http://<username>:<password>#<proxy-server-url>:<port>
$ npm config set https-proxy http://<username>:<password>#<proxy-server-url>:<port>
More info - https://forum.freecodecamp.org/t/how-to-run-npm-behind-a-proxy-server-a-step-by-step-guide/19386
I'm trying to share my module but it gives an error
npm ERR! code E400
npm ERR! 400 Bad Request - PUT https://registry.npmjs.org/saverdb - deprecations must be strings
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\win10\AppData\Roaming\npm-cache\_logs\2020-12-22T17_22_45_529Z-debug.log
How can I fix this error?
I'm pulling an Angular 6 project from our repo to my new laptop. My npm version is 6.9.0. My node version is 12.4.0. The project is an Angular 6.0.7 project. Globally I have Angular 6.0.8 installed, and locally (in my project), I have Angular CLI 6.0.8 but below that where it lists the Angular version, it says Angular: <error>.
ng serve fails with the error Could not find module "#angular-devkit/build-angular" from "my-project-path". Thus I tried to install this via npm install --save-dev #angular-devkit/build-angular. However, this also failed with the error message:
npm ERR! code EINTEGRITY
npm ERR! sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== integrity checksum failed when using sha512: wanted sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== but got sha512-2lGfU4gymmhXRUiPLeQlnlkMaSY8azJB9W8e/vFp44AlAOEvzf6XiBUoTHO9NBM4OVlehybxDM9B4SwLBh42mw==. (10271 bytes)
...
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/app-root-path failed, reason: write EPROTO 11628:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
I checked package-lock.json within my project, and in the file-saver object, the integrity key has sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== which is referenced in the error message as what npm wanted. I don't know why it got the other integrity value.
Any suggestions on how to resolve this EINTEGRITY error?
Expected Behavior
npm run build should create the production dist bundle that I can serve on a given machine
Current Behavior
Despite being able to build locally, whenever I try to run npm run build on an external resource (such as a Digital Ocean VM or Heroku machine), I receive the below error.
Failure Logs
root#nodejs-lazyq-dev:/var/www/html/Vue# npm run build
> vue-material-dashboard-pro#1.0.0 build /var/www/html/Vue
> vue-cli-service build
⠴ Building for production...
ERROR Failed to compile with 1 errors 09:29:00
error in ./src/assets/scss/_material-dashboard.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
#import "md/plugins/fullCalendar";
^
File to import not found or unreadable: md/plugins/fullCalendar.
in /var/www/html/Vue/src/assets/scss/_material-dashboard.scss (line 59, column 1)
at runLoaders (/var/www/html/Vue/node_modules/webpack/lib/NormalModule.js:286:20)
at /var/www/html/Vue/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /var/www/html/Vue/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/var/www/html/Vue/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.asyncSassJobQueue.push [as callback] (/var/www/html/Vue/node_modules/sass-loader/lib/loader.js:55:13)
at Object.done [as callback] (/var/www/html/Vue/node_modules/neo-async/async.js:7974:18)
at options.error (/var/www/html/Vue/node_modules/node-sass/lib/index.js:294:32)
# ./src/material-dashboard.js 17:0-48
# ./src/main.js
# multi ./src/main.js
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-material-dashboard-pro#1.0.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-material-dashboard-pro#1.0.0 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! /root/.npm/_logs/2018-09-03T09_29_01_030Z-debug.log
Additionally, I have tried running npm rebuild node-sass, updated the material-dashboard.css file to include the underscore: _material-dashboard.css, passing --production in npm install --production, but am having no luck.
nodejs version: v8.11.4
npm version: v5.6.0
I've been trying to solve this for a few hours now but am not having any luck. I don't understand why it works locally but not when on another production machine.
This happens because of a spelling mistake (wrong case) in the import statement of this Vue UI library. The file is named "fullcalendar" while the import is called by "fullCalendar" (notice the capital "C"). When you fix this (make the capital "C" simple in the import statement) it will run the "npm run prod" command successfully. It should be noted that, for me, this did not occur in the windows environment for some reason, but only occurs in the Linux environment.