Build error when building react app on vercel - reactjs

when I was trying to deploy a react app on vercel I'm getting this error message
[12:54:56.889] Cloning github.com/<project name> (Branch: main, Commit: 377f238)
[12:54:56.897] The cli flag --force was set. Skipping build cache download.
[12:54:58.099] Cloning completed: 1.210s
[12:54:58.100] Running "code 0"
[12:54:58.105] /bin/sh: code: command not found
[12:54:58.111] Error: Command failed with exit code 127: code 0
[12:54:58.112] at zZe (/var/task/sandbox.js:293:57)
[12:54:58.112] at /var/task/sandbox.js:293:9994
[12:54:58.112] at processTicksAndRejections (internal/process/task_queues.js:95:5) {
[12:54:58.112] shortMessage: 'Command failed with exit code 127: code 0',
[12:54:58.112] command: 'code 0',
[12:54:58.113] exitCode: 127,
[12:54:58.113] signal: undefined,
[12:54:58.113] signalDescription: undefined,
[12:54:58.113] stdout: undefined,
[12:54:58.113] stderr: undefined,
[12:54:58.113] failed: true,
[12:54:58.115] timedOut: false,
[12:54:58.115] isCanceled: false,
[12:54:58.115] killed: false
[12:54:58.115] }
Until the last build, it was building successfully when I was trying to build from a GitHub commit.
I don't have any idea what happens behind it. there is a possibility that I updated my node version on my local machine.

Related

A Problem occurred starting process 'command '../../node_modules/hermesvm/win64-bin/hermes

When i try to debug using the command react-native run-android --variant=betaDebug --appIdSuffix=prod it works perfectly fine. but when i tried to release a build using ./gradlew assembleBetaRelease this happens
Execution failed for task ':app:bundlereleasejsandassets'. > a problem occurred starting process 'command '../../node_modules/hermesvm/win64-bin/hermes
I tried making some changes in fixing the path, but still same error
project.ext.react = [
...some options...
enableHermes: true,
hermesCommand: "../../node_modules/hermesvm/%OS-BIN%/hermes"]
enter image description here

events.js:288 Error: write EPIPE when executing tests with Jest

I have a problem when setting React Testing Library into a new project, which is a project that generates common UI components for several projects. In one of the projects it is correctly setup, but when I added React Testing Library and updated dependencies in this project, I am able to run a test but not all of them.
If I do yarn test this is the result:
Test Suites: 8 passed, 8 of 33 total
Tests: 84 passed, 84 total
Snapshots: 0 total
Time: 28 sevents.js:288
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at ChildProcess.target._send (internal/child_process.js:806:20)
at ChildProcess.target.send (internal/child_process.js:677:19)
at ChildProcessWorker.send (C:\Users\user\workspace\project\node_modules\jest-worker\build\workers\ChildProcessWorker.js:291:17)
at WorkerPool.send (C:\Users\user\workspace\project\node_modules\jest-worker\build\WorkerPool.js:32:34)
at Farm._process (C:\Users\user\workspace\project\node_modules\jest-worker\build\Farm.js:129:10)
at Farm._enqueue (C:\Users\user\workspace\project\node_modules\jest-worker\build\Farm.js:152:10)
at Farm._push (C:\Users\user\workspace\project\node_modules\jest-worker\build\Farm.js:159:12)
at C:\Users\user\workspace\project\node_modules\jest-worker\build\Farm.js:90:14
at new Promise (<anonymous>)
at Farm.doWork (C:\Users\user\workspace\project\node_modules\jest-worker\build\Farm.js:56:12)
Emitted 'error' event on ChildProcess instance at:
at internal/child_process.js:810:39
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
errno: 'EPIPE',
code: 'EPIPE',
syscall: 'write'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I tried doing rm -rf node_modules and then cleaning cache, and didn't work.
Any help?
It turns out that by changing some libraries in package.json the error dissapears:
Before (KO):
"babel-jest": "^24.9.0",
"jest": "^26.0.1",
After (OK):
"babel-jest": "^26.0.1",
"jest": "^25.5.4",
By doing yarn cache clean solved my problem. If you met pipe error similar like image below. I believe it is related to memory leaks.
In my case was the version of node. I had the version 15 (from Latest Features) and changed it to the stable version 14.17.3 (from LTS).
To know which version you have use node -v in a terminal.

Cant start react-native at android via react-native run-android

BUILD FAILED in 3s
Cant run react-native run-android
i connect fierbase in this project
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Script 'E:\react\fb (2)\fb\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 191
* What went wrong:
A problem occurred evaluating settings 'fb'.
> Unable to determine the current character, it is not a string, number, array, or object
The current character read is 'E' with an int value of 69
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
Error: Unexpected close tagLine: 31Column: 11Char: > at error (E:\react\fb (2)\fb\node_modules\sax\lib\sax.js:651:10) at strictFail (E:\react\fb (2)\fb\node_modules\sax\lib\sax.js:677:7) at closeTag (E:\react\fb (2)\fb\node_modules\sax\lib\sax.js:871:9) at SAXParser.write (E:\react\fb (2)\fb\node_modules\sax\lib\sax.js:1436:13) at new XmlDocument (E:\react\fb (2)\fb\node_modules\xmldoc\lib\xmldoc.js:261:15) at readManifest (E:\react\fb (2)\fb\node_modules\#react-native-community\cli-platform-android\build\config\readManifest.js:38:10) at Object.projectConfig (E:\react\fb (2)\fb\node_modules\#react-native-community\cli-platform-android\build\config\index.js:59:46) at Object.get project [as project] (E:\react\fb (2)\fb\node_modules\react-native\node_modules\#react-native-community\cli\build\tools\config\index.js:134:65) at E:\react\fb (2)\fb\node_modules\react-native\node_modules\#react-native-community\cli\build\commands\config\config.js:8:452 at Array.forEach (<anonymous>)
^
* 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.

when generating build of AngularJS project getting Uglifying source .tmp/concat/scripts/scripts.js failed

Creating build of angularjs project inside folder dist /script I am not getting one script.js file.
I have tried grunt build --prod --force command for creating the build
Running "uglify:generated" (uglify) task
JS_Parse_Error {enter code here
message: 'Unexpected token: punc ())',
filename: '../../.tmp/concat/scripts/scripts.js',
line: 5122,
col: 59,
pos: 161138,
stack:
'Error\n at new JS_Parse_Error (D:\\...node_modules\\uglify-node_modules\\uglify-js\\lib\\parse.js:1427:20)' }
>> Uglifying source .tmp/concat/scripts/scripts.js failed.
Warning: Uglification failed.
Unexpected token: punc ()).
Line 5122 in .tmp/concat/scripts/scripts.jsenter code here
Used --force, continuing.
Warning: Cannot read property min of undefined Used --enter code hereforce, continuing.

Ansible install RethinkDB on ubuntu 16

I am trying to use ansible package to install a specific version of RethinkDB on ubuntu 16.04.
I use :
- name: Ensure rethinkDB package repository is present
apt_repository: repo='deb http://download.rethinkdb.com/apt xenial main' state=present
tags:
- rethinkdb
- name: install RethinkDB
package: name=rethinkdb-2.3.2 state=latest
tags:
- rethinkdb
However I get the following error:
TASK [install RethinkDB]
******************************************************* task path: /Users/nha/.../playbook.yml:173 fatal:
[machine]: FAILED! => {"changed": false, "failed": true, "msg": "No
package matching 'rethinkdb-2.3.2' is available"} to retry, use:
--limit #ops/ansible/playbook.retry
Even leaving out the version, I get the error:
TASK [install RethinkDB]
******************************************************* task path: /Users/nha/.../playbook.yml:173 fatal:
[machine]: FAILED! => {"cache_update_time": 0, "cache_updated": false,
"changed": false, "failed": true, "msg": "'/usr/bin/apt-get -y -o
\"Dpkg::Options::=--force-confdef\" -o
\"Dpkg::Options::=--force-confold\" install 'rethinkdb'' failed:
E: There were unauthenticated packages and -y was used without
--allow-unauthenticated\n", "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stdout":
"Reading package lists...\nBuilding dependency tree...\nReading state
information...\nThe following additional packages will be installed:\n
libcurl3\nThe following NEW packages will be installed:\n libcurl3
rethinkdb\n0 upgraded, 2 newly installed, 0 to remove and 0 not
upgraded.\nNeed to get 11.2 MB of archives.\nAfter this operation,
40.2 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n rethinkdb\n", "stdout_lines":
["Reading package lists...", "Building dependency tree...", "Reading
state information...", "The following additional packages will be
installed:", " libcurl3", "The following NEW packages will be
installed:", " libcurl3 rethinkdb", "0 upgraded, 2 newly installed, 0
to remove and 0 not upgraded.", "Need to get 11.2 MB of archives.",
"After this operation, 40.2 MB of additional disk space will be
used.", "WARNING: The following packages cannot be authenticated!", "
rethinkdb"]} to retry, use: --limit #ops/ansible/playbook.retry
The first error message states that the RethinkDB apt repo doesn't contain a package for a 2.3.2 version.
The second error is because you haven't yet added the apt key to trust this repo. RethinkDB's Ubuntu installation instructions also mentions that you will need to add their apt key.
You can easily do this with the apt_key module:
- name: add rethinkdb apt key
apt_key: url=https://download.rethinkdb.com/apt/pubkey.gpg
As an aside, it doesn't really make much sense to specify a version and then also specify latest on the state.

Resources