"unable to get local issuer certificate" - yarnpkg

[builder 4/6] RUN yarn:
#10 0.574 yarn install v1.22.19
#10 0.704 [1/4] Resolving packages...
#10 1.587 [2/4] Fetching packages...
#10 2.112 error An unexpected error occurred: "https://registry.yarnpkg.com/#babel/runtime/-/runtime-7.18.9.tgz: unable to get local issuer certificate".
#10 2.112 info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
#10 2.112 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
executor failed running [/bin/sh -c yarn]: exit code: 1
I have used the following commands, but still, I'm getting this error certificate error.
yarn install --ignore-engines --ignore-platform
yarn config set "strict-ssl" false -g
yarn config set enableStrictSsl false

Related

Docker : Anaconda error : HTTP 000 CONNECTION FAILED error in WINDOWS

I am building an existing code base (python fast api) in docker (in windows). Docker-compose throws an error. I use corporate laptop with zscaler. It looks like repodata.json is ~240Mb, this is not getting downloaded or failed inside the container for some weird unknown reason.
Options I tried:
Googled and read conda docs , FAQ on HTTP 000 connection issue.
ssl verify to false
Exported root certificate from browser to container root
Set request_ca_bundle parameter to crt path
Increased remote_read_timeout_secs to 600 sec in condarc
I created docker from power shell and curl the repodata.json url . This can able to download huge repodata.json file quickly.
Please share some troubleshooting steps. I also used verbose flag in conda ; not much help.
base image : continuumio/miniconda3:4.9.2
The same code works great in MacOS or from Linux. FYI.
[ 8/17] RUN conda env update --name base: #0 0.672 Collecting package metadata (repodata.json): ...working... failed #0 608.5 #0 608.5 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda- forge/linux-64/repodata.json> #0 608.5 Elapsed: - #0 608.5 #0 608.5 An HTTP error occurred when trying to retrieve this URL. #0 608.5 HTTP errors are often intermittent, and a simple retry will get you on your way.
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.8
- pydantic==1.8.2
- pip
- pip:
- jaydebeapi==1.2.3
- pyOpenSSL==23.0.0
- certifi==2022.12.7
troubleshooting steps and tips

How to resolve error on ProcessMaker 4.3.0 instllation?

My server specifications:
Centos 7.9
PHP 8.2
Nginx
MySQL 8.0
Composer 2.4.4
Node 16.18.1
NPM 8.19.3
Redis 5
Docker
I have installed all the dependencies required for ProcessMaker 4.3.0 running(mentioned the versions above). After enabling the npm, laravel and artisan horizan server, I hit the URL and get 500 error. On checking the nginx log I get the following error:
[error] 8150#8150: *512 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/opt/processmaker-4.3.0/storage/framework/views/ef0f3565ae74afa67f42e441ee3da8cfbe934ae1.php): Failed to open stream: Permission denied in /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:187 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(187): file_put_contents() #2 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(169): Illuminate\Filesystem\Filesystem->put() #3 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(55): Illuminate\View\Compilers\BladeCompiler->compile() #4 /opt/processmaker-4.3.0/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get() #5 /opt/processmaker-4.3.0/vendor/laravel/fram...PHP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/opt/processmaker-4.3.0/storage/framework/views/ef0f3565ae74afa67f42e441ee3da8cfbe934ae1.php): Failed to open stream: Permission denied in /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:187 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(187): file_put_contents() #2 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(169): Illuminate\Filesystem\Filesystem->put() #3 /opt/processmaker-4.3.0/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(55): Illuminate\View\Compilers\BladeCompiler->compile() #4 /opt/processmaker-4.3.0/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get
I have already given 755 permission to the storage and vendor folder in processmaker. Also the owner ship and group of all the folders and files is nginx.
Whatelse, could I be missing out?

Getting error while bootstrapping opensearch dashboard

I am setting up opensearch dashboard in my windows PC and following below guide -
https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/DEVELOPER_GUIDE.md
While bootstrapping, I am getting below error -
PS D:\opensearch\OpenSearch-Dashboards> yarn osd bootstrap
yarn run v1.22.18
$ node scripts/osd bootstrap
info [opensearch-dashboards] running yarn
$ node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "typescript#4.0.2" is incompatible with requested version "typescript#~4.5.2"
success Already up-to-date.
succ yarn.lock analysis completed without any issues
succ 10 bootstrap builds are cached
info [#osd/i18n] running [osd:bootstrap] script
info [#osd/monaco] running [osd:bootstrap] script
info [#osd/opensearch-archiver] running [osd:bootstrap] script
info [#osd/opensearch] running [osd:bootstrap] script
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: C:\Users\st\AppData\Roaming\nvm\v14.18.2\node_modules\yarn\bin\yarn.js run osd:bootstrap
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
$ rm -rf target && tsc
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
at makeError (D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:25150:11)
at handlePromise (D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:24085:26)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:9051:9
at async scheduleItem (D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:10938:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
what I see here is, rm command is not recognized in windows and which is correct.
So how to fix this ?

Deploying KotlinJs React web app to Heroku, error extracting tar content of undefined failed

I have the following setup. Kotlin Multiplatform project with a Web App and Shared module. I also have included a build of a library that I had to modify myself as it wasn't working properly.
When trying to deploy to Heroku with these steps I get the following error
> Task :common:root:jsPackageJson
> Task :web-app:packageJson
> Task :web-app:testPackageJson
> Task :rootPackageJson
> Task :kotlinNpmInstall
warning workspace-aggregator-7524aa80-df12-48c3-95c5-de7144004dc0 > firebase-kotlin-sdk-firebase-app > webpack-dev-server > sockjs > uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning workspace-aggregator-7524aa80-df12-48c3-95c5-de7144004dc0 > firebase-kotlin-sdk-firebase-app > webpack-dev-server > url > querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
error https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001269.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat '/app/.cache/yarn/v6/npm-caniuse-lite-1.0.30001269-3a71bee03df627364418f9fd31adfc7aa1cc2d56-integrity/node_modules/caniuse-lite/LICENSE'"
> Task :firebase-kotlin-sdk:kotlinNpmInstall
error https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001269.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat '/app/.cache/yarn/v6/npm-caniuse-lite-1.0.30001269-3a71bee03df627364418f9fd31adfc7aa1cc2d56-integrity/node_modules/caniuse-lite/data/features/getcomputedstyle.js'"
> Task :firebase-kotlin-sdk:kotlinNpmInstall FAILED
> Task :kotlinNpmInstall FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':kotlinNpmInstall'.
> Process 'Resolving NPM dependencies using yarn' returns 1
yarn install v1.22.10
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
* 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 ':firebase-kotlin-sdk:kotlinNpmInstall'.
> Process 'Resolving NPM dependencies using yarn' returns 1
yarn install v1.22.10
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
* 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 5m 20s
18 actionable tasks: 18 executed
! ERROR: Failed to run Gradle!
We're sorry this build is failing. If you can't find the issue in application
code, please submit a ticket so we can help: https://help.heroku.com
You can also try reverting to the previous version of the buildpack by running:
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-gradle#previous-version
Thanks,
Heroku
! Push rejected, failed to compile Gradle app.
! Push failed
Tried running kotlinNpmInstall locally on both the library and the whole project and it works properly, with no failures.
While I do not know the exact cause, it seems that multiple yarn process are spawned that corrupt each other's packages.
This can be solved with the mutex option.
To add yarn options to a kotlin/js project you can add a .yarnrc file to the root of your project.
My .yarnrc's content:
--install.mutex network
This makes yarn use a predefined port on the network for its mutex.

How to resolve this error : spawn yarn ENOENT?

Yarn Install successful:
C:\Users\Yael\Downloads\metamask-extension-8.0.9\metamask-extension-8.0.9>yarn
yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 2.77s.
Yarn dist error:
C:\Users\Yael\Downloads\metamask-extension-8.0.9\metamask-extension-8.0.9>yarn dist
yarn run v1.22.10
$ yarn build prod
$ node development/build/index.js prod
running task "prod"...
Starting 'prod'...
Starting 'clean'...
(node:12548) ExperimentalWarning: The fs.promises API is experimental
Finished 'clean'
Starting 'styles:prod'...
Finished 'styles:prod'
Starting 'scripts:deps:background'...
Starting 'scripts:deps:ui'...
Starting 'scripts:core:prod:background'...
Starting 'scripts:core:prod:ui'...
Starting 'scripts:core:prod:phishing-detect'...
Starting 'scripts:core:prod:contentscript'...
Starting 'static:prod'...
Starting 'manifest:prod'...
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn yarn ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
C:\Users\Yael\Downloads\metamask-extension-8.0.9\metamask-extension-8.0.9>

Resources