Error: The process '/usr/local/bin/npx' failed with exit code 1 - firebase

error
Hallo, I got the following message from Github while deploying to firebase :
Run failed: Deploy to Firebase Hosting on merge - master (bb2f1f1)
build_and_deploy
npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
"status": "error",
"error": "Directory 'dist/Ghomala' for Hosting does not exist."
"status": "error",
"error": "Directory 'dist/Ghomala' for Hosting does not exist."
The process '/usr/local/bin/npx' failed with exit code 1
Retrying deploy with the --debug flag for better error output
i hosting[lanye-ghomala]: beginning deploy...
Error: Directory 'dist/Ghomala' for Hosting does not exist.
The process '/usr/local/bin/npx' failed with exit code 1
Error: The process '/usr/local/bin/npx' failed with exit code 1
conclusion: 'failure',
output: ***
title: 'Deploy preview failed',
summary: "Error: The process '/usr/local/bin/npx' failed with exit code 1"
***

Related

Next JS deployment fail on Amazon Amplify ERR

I am trying to deploy an SSG app on Next JS but it's failing again and again I am getting an error of build failed. I have followed the documentation for deploying an SSG site on amazon but still, I am getting errors I don't know what's wrong.
Below is the log of my amplify app:
en
# Starting phase: preBuild
# Executing command: npm ci
2022-10-19T06:14:55.093Z [WARNING]: npm
2022-10-19T06:14:55.095Z [WARNING]: ERR! caniuse-lite not accessible from browserslist
2022-10-19T06:14:55.129Z [WARNING]:
2022-10-19T06:14:55.129Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-10-19T06_14_55_093Z-debug.log
2022-10-19T06:14:55.129Z [HELP]: Outputting the npm debug log
[object Promise]
2022-10-19T06:14:55.135Z [ERROR]: !!! Build failed
2022-10-19T06:14:55.135Z [ERROR]: !!! Non-Zero Exit Code detected
2022-10-19T06:14:55.135Z [INFO]: # Starting environment caching...
2022-10-19T06:14:55.137Z [INFO]: # Environment caching completed
Terminating logging...

Build failed when I try to run my flutter app

I attached what I got in debug console when I try to run my app.
These are my firebase dependencies
firebase_core: ^1.12.0
firebase_auth: ^3.3.8
cloud_firestore: ^3.1.9
Launching lib\main.dart on ***** in debug mode...
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:14:11: Error: Method not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(exception, stackTrace);
^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:17:9: Error: Method not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(
^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:12:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(Object exception, StackTrace stackTrace) {
^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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 21s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I have tried many methods, But they didn't work.
try flutter clean and then flutter run it work for me
flutter version 2.10.4
My first guess is that you might not finish platform-specific installation/setup for Firebase as well as Firebase plugins.
Just to verify that You can visit the FlutterFire website which will guide you through the installation steps for the targeting platforms for Firebase and plugin setup;
Otherwise, the flutter clean and flutter pub get should do the trick.
However, a problem still exists, you can restart your editor and just run the command flutter pub get/ flutter pub upgrade.

Ionic cordova build failed on ios

The following build commands failed:
PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /var/root/Library/Developer/Xcode/DerivedData/APPNAME-amivxpiudfokodaybfmgyefynkvt/Build/Intermediates.noindex/EzSchoolApps.build/Debug-iphonesimulator/EzSchoolApps.build/Script-2E6AFD309B981ED6E1842543.sh
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running sub process Cordova.
Cordova build iOS exited with exit code 65.
How to resolve above issue..?

AppCenter build error: Project firebaseauth_web at : is either no Android app project or build version has not been set to override

I have a mobile project in flutter and I am trying to build it on AppCenter but I got this error:
Project firebaseauth_web at : is either no Android app project or build version has not been set to override. Skipping...
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/runner/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-0.1.3+1/android/build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'firebaseauth_web'.
> Failed to apply plugin [id 'com.android.library']
> Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in /Users/runner/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-0.1.3+1/android/gradle/wrapper/gradle-wrapper.properties to gradle-5.4.1-all.zip
* 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 4s
The plugin firebase_auth_web could not be built due to the issue above.
##[error]The process '/bin/bash' failed with exit code 1
##[error]Bash failed with error: The process '/bin/bash' failed with exit code 1
##[section]Finishing: Post Clone Script
##[section]Starting: Checkout Chofu#master to s
==============================================================================
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: Chofu (ExternalGit)
##[section]Finishing: Checkout Chofu#master to s
##[section]Starting: Finalize Job
Cleaning up task ***
Start cleaning up orphan processes.
Terminate orphan process: pid (1490) (java)
Terminate orphan process: pid (1470) (java)
Terminate orphan process: pid (1462) (java)
Terminate orphan process: pid (1404) (java)
Terminate orphan process: pid (1289) (adb)
##[section]Finishing: Finalize Job
##[section]Finishing: Build
My gradle version is actually 6.1.1.
Here is my gradle-wrapper.properties from android/gradle code:
...
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
...
I have tried to change the version to 5.4.1 but I got a similar error:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/runner/runners/2.170.1/work/1/s/android/app/build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 6.1.1. Current version is 5.4.1. If using the gradle wrapper, try editing the distributionUrl in /Users/runner/runners/2.170.1/work/1/s/android/gradle/wrapper/gradle-wrapper.properties to gradle-6.1.1-all.zip
* 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 18s
Running Gradle task 'assembleRelease'... 19.8s
Gradle task assembleRelease failed with exit code 1
EDITED:
After a better look I discover other 2 errors:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':appcenter:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':appcenter_analytics:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
If someone could help me I would be grateful!
After one month of struggle I found how to solve the problem:
I have changed gradle version from android/gradle/wrapper/gradle-wrapper.properties from 6.1.1 to 5.6.2 . So my file looks like:
...
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
...
In android/build.gradle I have changed gradle tool version from 4.0.0 to 3.5.0:
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
...
}
In android/app/build.gradle I have added checkReleaseBuilds false to lintOptions :
lintOptions {
...
checkReleaseBuilds false
}
In android/app/appcenter-post-clone.sh I have added two builds before --release build:
...
# build APK
flutter build apk --debug
flutter build apk --profile
flutter build apk --release
...
I hope this will help others :)

Error canonicalCode: INVALID_ARGUMENT, "errorMessage": "`npm_install` had stderr output while firebase deploy

I'm deploying my nodeJS code with firebase, If I do firebase serve on local machine it works fine, but when I do firebase deploy it gives me multiple errors.
{"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "npm_install had stderr output.....}}
if i resolve this issue then i get.
gen_package_lock` had stderr output.
I am not able to deploy firebase.
I am using node version >12 and integrated firebase with that. Stuck on this,
Tried with removing package-lock.json as well.
ERROR:-
Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "npm_install had stderr output:\nnpm ERR! cb() never called!\n\nnpm ERR! This is an error with npm itself. Please report this error at:\nnpm ERR! https://npm.community\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /builder/home/.npm/_logs/2019-12-13T07_06_14_773Z-debug.log\n\nerror: npm_install returned code: 1", "errorType": "InternalError", "errorId": "8042D85F"}}
Expecting some solutions to resolve this issue.
Thanks

Resources