Angularjs : Error occur after install angular cli using yarn - angularjs

I am trying to install angular CLI using yarn, for some reason because npm installation of angular CLI has also error don't know why. that's why i'm trying to use yarn
tried this command:
yarn global add angular-CLI
and the error is this :
test#test-X455LAB ~ $ yarn global add angular-cli
yarn global v1.2.1
[1/4] Resolving packages...
warning angular-cli#1.0.0-beta.28.3: angular-cli has been renamed to
#angular/cli. Please update your dependencies.
warning angular-cli > remap-istanbul > istanbul > fileset >
minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid
a RegExp DoS issue
info There appears to be trouble with your network connection.
Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "http://registry.npmjs.org/isobject: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/home/test/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
what seems to be the problem? thanks

Related

yarn "EPERM: operation not permitted, mkdir"

when I try to use yarn install it says
warning ........\package.json: No license field
error An unexpected error occurred: "EPERM: operation not permitted, mkdir 'C:\Users\HiteshKumar'".
info If you think this is a bug, please open a bug report with the information provided in "C:\Users\Hitesh Kumar\OneDrive\Desktop\intern\mvp-web\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
screenshot of the error
I was trying to use the command yarn install to install the node modules required for the project.

Denial of Service - http proxy - React

I am pretty sure that this error appeared only today and it never occurred before.
When I create a new react app, the process found 1 high vulnerability:
High: Denial of Service
Package: http-proxy
Patched in: No patch available
Dependency of: react-scripts
Path: react-scripts > webpack-dev-server > http-proxy-middleware > http-proxy
More info: https://npmjs.com/advisories/1486
(My version of "react-scripts" is 3.4.1). Of course, "npm audit fix" doesn't work.
What can I do about it? Is it something to care about or I can work normally?
All versions of http-proxy are vulnerable to Denial of Service. An HTTP request with a long body triggers an ERR_HTTP_HEADERS_SENT unhandled exception that crashes the proxy server. This is only possible when the proxy server sets headers in the proxy request using the proxyReq.setHeader function.
For a proxy server running on http://localhost:3000, the following curl request triggers the unhandled exception:
curl -XPOST http://localhost:3000 -d "$(python -c 'print("x"*1025)')"
Remediation
No fix is currently available. Consider using an alternative package until a fix is made available.
Conclusion
But for the time being, you can work normally. It should not cause any type of working anomaly as of now.
Upgrade to http-proxy 1.18.1+ which contains a fix for the security issue detailed. NPM have now updated their security APIs to include the information that this issue is now resolved.
See https://github.com/http-party/node-http-proxy/issues/1446 for more info
first install the package
npm install http-proxy --save-dev
in your package.json file add the following statements
"resolutions" :{
"http-proxy": "^1.18.1"
}
"scripts" :{
"preinstall": "npx npm-force-resolutions"
}
then run the command in the command prompt-
npm install
this might fixed your vulnerability

Deploy React JS SPA in Openshift

I have build a React JS app and triggered yarn build command. Its builded successfully and if I run yarn global add serve, its working perfectly on http://localhost:5000. After that I tried below link to deploy this code to OpenShift.
OpenShift Deployment
According to the document, I tried to run npx nodeshift --strictSSL=false --dockerImage=bucharestgold/centos7-s2i-web-app --imageTag=10.13.0 --build.env YARN_ENABLED=true --expose
Then I got this log -
npx: installed 216 in 37.284s
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:25:35
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\index.js:23:39
2019-12-21T11:58:07.841Z INFO loading configuration
kubernetes-client deprecated fromKubeconfig see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md#request-kubeconfig- ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\nodeshift-config.js:35:32
2019-12-21T11:58:07.882Z INFO using namespace smart-learner at https://c101-e.jp-tok.containers.cloud.ibm.com:30512
kubernetes-client deprecated Client({ config }), see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:95:18
kubernetes-client deprecated Request() without a .kubeconfig option, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\kubernetes-client\lib\swagger-client.js:200:19
2019-12-21T11:58:07.928Z WARNING a file property was not found in your package.json, archiving the current directory.
2019-12-21T11:58:07.929Z INFO creating archive of .gitignore, build, Dockerfile, package-lock.json, package.json, public, README.md, src, yarn.lock
2019-12-21T11:58:09.001Z INFO using existing build configuration smartlearner-s2i
2019-12-21T11:58:09.377Z INFO using existing image stream smartlearner
2019-12-21T11:58:09.378Z INFO uploading binary archive C:\ReactAPP\smartlearner/tmp/nodeshift/build/archive.tar
2019-12-21T11:58:15.825Z INFO binary upload complete
2019-12-21T11:58:15.828Z INFO waiting for build to finish
kubernetes-client deprecated .getStream use .getByteStream, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\build-watcher.js:56:107
2019-12-21T11:58:19.798Z TRACE Using bucharestgold/centos7-s2i-web-app:10.x as the s2i builder image
2019-12-21T11:58:20.550Z TRACE ls: cannot access /tmp/src/node_modules: No such file or directory
2019-12-21T11:58:20.564Z TRACE ---> Installing application source
2019-12-21T11:58:20.585Z TRACE ---> Building your Web Application from source
2019-12-21T11:58:20.592Z TRACE Current git config
2019-12-21T11:58:20.620Z TRACE url.https://github.com.insteadof=git#github.com:
2019-12-21T11:58:20.629Z TRACE url.https://.insteadof=ssh://
2019-12-21T11:58:20.629Z TRACE url.https://github.com.insteadof=ssh://git#github.com
2019-12-21T11:58:20.630Z TRACE ---> Using 'yarn install' with YARN_ARGS
2019-12-21T11:58:21.356Z TRACE yarn install v1.10.1
2019-12-21T11:58:21.594Z TRACE warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
2019-12-21T11:58:21.657Z TRACE [1/4] Resolving packages...
2019-12-21T11:58:23.111Z TRACE [2/4] Fetching packages...
2019-12-21T11:58:53.081Z TRACE error #typescript-eslint/eslint-plugin#2.10.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "10.12.0"
2019-12-21T11:58:53.083Z TRACE error Found incompatible module
2019-12-21T11:58:53.086Z TRACE info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2019-12-21T11:58:58.441Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-web-app:10.x
2019-12-21T11:59:00.497Z ERROR build failed with message: Assemble script failed.
2019-12-21T11:59:00.503Z ERROR Assemble script failed.
i am not able to understand what I am missing here. I found that bucharestgold/centos7-s2i-web-app has been depreicated and tried with npx nodeshift --strictSSL=false --dockerImage=nodeshift/ubi8-s2i-web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000 --expose. This is also throwing same error message.
You can use the new web-app flag feature and let nodeshift set the appropriate docker image.
Try running this command instead npx nodeshift --web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000

fatal: unable to access 'https://github.com/gabelerner/canvg.git/': Peer reports incompatible or unsupported protocol version

I am facing this issue in jenkins when i run bower install --allow-root. The build fails displaying the following error:
Failed to execute "git ls-remote --tags --heads
https://github.com/gabelerner/canvg.git
final build failure error displays as follows:
fatal: unable to access 'https://github.com/gabelerner/canvg.git/': Peer reports incompatible or unsupported protocol version
It shows the same error with different GIT file paths.
Previous error was :
Error fetching remote repo 'origin'
which we solved changing the SSH key.
If we remove bower install command from the build, the build is successful.
Any help would be appreciated.
This may be the reason to your problem:
Discontinue support for weak cryptographic standards
....As a result, GitHub is announcing the immediate deprecation, and
eventual disablement, of our use of the following cryptographic
standards:
TLSv1/TLSv1.1 - This applies to all HTTPS connections, including web,
API, and git connections to https://github.com and
https://api.github.com. diffie-hellman-group1-sha1 - This applies to
all SSH connections to github.com. diffie-hellman-group14-sha1 - This
applies to all SSH connections to github.com. All of the above will be
disabled on February 1, 2018.
so you need to upgrade to stronger ciphers.
I see that this solution helped others
github-unable-to-access-ssl-connect-error
yum update -y nss curl libcurl
I hope this helps
fatal: unable to access 'https://github.com/john/git-Training.git/': Peer reports incompatible or unsupported protocol version.
I upgraded to the newest cipher, the fatal error was gone.
[john#doe git-Training]$ sudo yum update -y nss curl libcurl

ECMDERR during bower install

I'm new to git, bower and electron etc.
I'm trying to install some dependencies through command line like this
bower install angular angular-route angular-material --save
It gives me error
I found this solution that says
You are probably behind a firewall. Try cloning via https – that has a higher chance of not being blocked
Then I tried this
bower install https://github.com/angular/bower-angular.git
but it still giving me error
Basically Error is
ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=No such file or directory
Additional error details: fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=No such file or directory
Can anyone have Idea what I'm doing wrong or what I'm missing here? I'm totally stuck over here. Any kind of help will be appreciated.
try this
git config --global url."https://".insteadOf git://
check this question for more details:
How to fix bower ECMDERR
I had some invalid proxy settings in .bowerrc
Removed them. All good :)
I managed to get it to work after i changed my .gitconfig file to sslVerify = false
Here is how my .gitconfig looks like:
[http]
sslVerify = false
[url "https://"]
insteadOf = git://
[url "https://github.com/"]
insteadOf = git://github.com/

Resources