Error: Debug Failure. Output generation failed when running formatjs extract - formatjs

When running formatjs extract this is what we got. From the stack trace it seems that the issue is from formatjs themselves. Feel like I am stuck on what the issue is here.
$ formatjs extract './src/**/*.{js,ts,tsx}' --out-file './src/i18n/messages/messages.json' --extract-from-format-message-call --throws
Error: Debug Failure. Output generation failed
at Object.transpileModule (/Users/.../node_modules/#formatjs/cli/node_modules/typescript/lib/typescript.js:126894:29)
at processFile (/Users/.../node_modules/#formatjs/cli/src/extract.js:104:39)
at /Users/.../node_modules/#formatjs/cli/src/extract.js:163:59
at step (/Users/.../node_modules/#formatjs/cli/src/extract.js:44:23)
at Object.next (/Users/.../node_modules/#formatjs/cli/src/extract.js:25:53)
at fulfilled (/Users/.../node_modules/#formatjs/cli/src/extract.js:16:58)
error Command failed with exit code 1.

You might be processing a file that needs to be ignored using --ignore. Can you upgrade to the latest version and re-run your command? Long added the filename in this commit https://github.com/formatjs/formatjs/commit/ceb0bf8a58c13fe6811bc35191018ee1c431484a
Reference: https://github.com/formatjs/formatjs/issues/2044

Related

Failed to compile values file. ERROR : app:mergeDebugResources FAILED

I try to run my program but I have a Build: failed
Failed to compile values file
I don't know why but the sentence is showing me
Task :app:mergeDebugResources FAILED
and I have this error
Execution failed for task ':app:mergeDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Resource compilation failed. Check logs for details.
and the explanation
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.
Does anyone have a solution?
Please?
The error suggests something related to any values file entry you have.
For example : when adding a string entry value many times the char ' is present without the proper escape char \
<string name="_title">Today's</string>
needs to be corrected to:
<string name="_title">Today\'s</string>

How to get a basic direvent watcher working?

I have read through the direvent documentation and am trying to get a simple watch working. Since I am having so much trouble with it, I am wondering if the issue has to do with the fact that the system I am using is nixos.
Here is the simple watcher file, watcher, I've created:
watcher {
path ./dir;
command "echo $file";
}
I run it in the foreground, so I can see the output, with direvent --foreground watcher. Once it's running, I create a file in dir, thus creating an event for it to respond to. However, it fails with the following output:
$ direvent --foreground watcher
direvent: [INFO] direvent 5.2 started
direvent: [ERROR] process 8552 failed with status 127
direvent: [ERROR] process 8555 failed with status 127
direvent: [ERROR] process 8557 failed with status 127
Since 127 usually means 'command not found', I tried specifying the path to echo, i.e. running this watcher instead:
watcher {
path ./dir;
command "/run/current-system/sw/bin/echo $file";
}
Then the output still gives an error, albeit a different one:
$ direvent --foreground watcher
direvent: [INFO] direvent 5.2 started
direvent: [ERROR] process 8645 failed with status 1
direvent: [ERROR] process 8651 failed with status 1
direvent: [ERROR] process 8652 failed with status 1
So the failure is now with status 1. I am not sure what to try next. I'm wondering if this issue is due to the fact that I am running nixos. Anyone know what I might try next to get direvent working?
direvent has two other flag that may be useful for you.
--debug(-d) to give extra information.
There's also --lint(t) that check the configuration file for errors, but I suspect this isn't your issue if direvent is running.
Source: https://www.gnu.org.ua/software/direvent/manual/direvent.html

Yocto: bitbake exit code confusion

I get an error while building an image using Yocto (dizzy):
ERROR: Creation of tar /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz failed.
and bitbake command fails with the following report:
No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
If I check the file xev-dbg-1.2.1-r0.tar.gz, I get:
$ file /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz
/mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz: gzip compressed data, from Unix, last modified: Mon Mar 27 20:19:55 201
and it is the same case for the remaining two errors.
I am confused:
if there was an error, why bitbake is reporting that all tasks succeeded?
If the file were successfully created, why bitbake exits with non zero value?
Bitbake did not return a 0 exit-code. This mean that there are errors in the bitbake process.
There are 3 errors when it is trying to create the tar files as shown.
The compressed file is there but it is not complete. E.g. Just like how you could download a file and interrupt it and the download file is still there. So we usually use md5sum or some kind of hash number to check on the completeness of the file.
A better understanding might be: Bitbake attempted to run 6292 task. 18 of them do not need to rerun. Bitbake attempted to rerun the rest 6274(6292-18) and succeeded in rerunning them. This does not mean that all of them are successfully compiled. In the process of rerunning them, there are 13 warnings and and 3 errors appeared. Because of the 3 errors, bitbake returns with a non-zero exit code.
No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

Issue deploying to elastic beanstalk "50npm.sh failed"

I'm having an issue deploying some code to one of my environments.
Creating application version archive "app-aa68e-170213_103330".
Uploading PAS-API/app-aa68e-170213_103330.zip to S3. This may take a while.
Upload Complete.
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
ERROR: Failed to run npm install. Snapshot logs for more details.
ERROR: [Instance: i-0ee97a5c7bcab8d51] Command failed on instance. Return code: 1 Output: (TRUNCATED)..."/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v4.4.6-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-0ee97a5c7bcab8d51'. Aborting the operation.
It seems that the deployment is failing when npm install is running on the server.
When I checked the package.json it seemed some of the deps were added as a tarball instead of a version number, meaning that when it installed and saved it looked like this:
"basic-auth": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.4.tgz"
Rather than
"basic-auth": "^1.1.0",
This was failing on npm install on the eb instance, it looks like it works now.
If it was OK before and you didn't change deployment settings, you can reboot the instance and it usually solve the problem.

Error: Invalid or corrupt jarfile occured while trying to build recommendation engine of PredictionIO in Linux machine

Error occured while trying to build the recommendation engine using PredictionIO. Please anyone know how to solve this issue.
root#testing:~/PredictionIO/engines# pio build --verbose
[INFO] [Console$] Using command '/root/PredictionIO/sbt/sbt' at the current working directory to build.
[INFO] [Console$] If the path above is incorrect, this process will fail.
[INFO] [Console$] Uber JAR disabled. Making sure lib/pio-assembly-0.9.4.jar is absent.
[INFO] [Console$] Going to run: /root/PredictionIO/sbt/sbt package assemblyPackageDependency
[ERROR] [Console$] Error: Invalid or corrupt jarfile /root/PredictionIO/sbt/sbt-launch-0.13.7.jar
[ERROR] [Console$] Return code of previous step is 1. Aborting.
For me help to download this file
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.7/sbt-launch.jar
Rename downloaded file to sbt-launch-0.13.7.jar and replace previous file in PredictionIO/sbt/

Resources