Jenkins build failing to install pngquant - docker

I'm running this Jenkins Image in Docker.
In one of my builds, I'm attempting to install the following packages:
json
"devDependencies": {
"#babel/core": "^7.0.0-beta.40",
"#babel/preset-env": "^7.0.0-beta.40",
"babel-loader": "^8.0.0-beta.0",
"css-loader": "^0.28.11",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.1.0",
"image-webpack-loader": "^4.2.0",
"node-sass": "^4.8.3",
"sass-loader": "^6.0.7",
"style-loader": "^0.20.3",
"webpack": "^4.0.1",
"webpack-cli": "^2.0.13",
"webpack-dev-server": "^3.1.1"
}
However, the build keeps failing when attempting to install pngquant-bin#4.0.0:
> node-sass#4.8.3 install /var/jenkins_home/workspace/crypto-coaster/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/linux-x64-57_binding.node
Download complete
Binary saved to /var/jenkins_home/workspace/crypto-coaster/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /var/jenkins_home/.npm/node-sass/4.8.3/linux-x64-57_binding.node
> cwebp-bin#4.0.0 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/cwebp-bin
> node lib/install.js
✔ cwebp pre-build test passed successfully
> gifsicle#3.0.4 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/gifsicle
> node lib/install.js
✔ gifsicle pre-build test passed successfully
> mozjpeg#5.0.0 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/mozjpeg
> node lib/install.js
✔ mozjpeg pre-build test passed successfully
> optipng-bin#3.1.4 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/optipng-bin
> node lib/install.js
✔ optipng pre-build test passed successfully
> pngquant-bin#4.0.0 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/pngquant-bin
> node lib/install.js
⚠ The `/var/jenkins_home/workspace/crypto-coaster/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/var/jenkins_home/workspace/crypto-coaster/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
I've updated the Docker image, tried different versions of Node (7.9.0, 8.11.1) and keep running into the same error.
No idea how to fix get pngquant-bin working on this build.
Any assistance would be greatly appreciated.

According to this issue https://github.com/imagemin/pngquant-bin/issues/78.
I use this dockerfile to create a new image and it work fine.
FROM jenkins/jenkins:lts
USER root
RUN apt-get update && apt-get install -y gcc make libpng-dev
USER jenkins

Related

Building a vue.js application with docker multistage fails on COPY

I have a problem with a vue.js application that I want to deploy with docker. The deployment has always worked fine with this version of the docker configuration files but since importing large files on the application I have a pretty known error. I found multiple topics with the same problem but no solution works for me.
package.json
{
"name": "[...]",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
[...]
}
The Dockerfile
#build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine as production-stage
COPY ./nginx_config/nginx.conf /etc/nginx/nginx.conf
RUN rm -rf /usr/share/nginx/html/*
# RUN ls -lart
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Docker-compose.yml
version: '3.7'
services:
portfolio:
container_name: portfolio
build:
context: .
dockerfile: Dockerfile
ports:
- '80:80'
Building logs
Building portfolio
Step 1/13 : FROM node:lts-alpine as build-stage
---> 8e69714aa82b
Step 2/13 : WORKDIR /app
---> Using cache
---> c1e93cbee6d6
Step 3/13 : ENV PATH /app/node_modules/.bin:$PATH
---> Using cache
---> 23f0528e6c9f
Step 4/13 : COPY package*.json ./
---> 03789a2585f2
Step 5/13 : RUN npm install
---> Running in a7f62007da83
npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated vue-cli#2.9.6: This package has been deprecated in favour of #vue/cli
npm WARN deprecated html-webpack-plugin#3.2.0: 3.x is no longer supported
npm WARN deprecated eslint-loader#2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated 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.
npm WARN deprecated request#2.16.6: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated hawk#0.10.2: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated boom#0.3.8: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek#0.7.6: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles#0.1.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp#0.1.4: This module moved to #hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated json3#3.2.6: Please use the native JSON object instead of JSON 3
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated node-uuid#1.4.1: Use uuid module instead
> ws#0.4.31 install /app/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> ws#0.4.31 install /app/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> yorkie#2.0.0 install /app/node_modules/yorkie
> node bin/install.js
setting up Git hooks
can't find .git directory, skipping Git hooks installation
> node-sass#5.0.0 install /app/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/linux_musl-x64-83_binding.node
Download complete
Binary saved to /app/node_modules/node-sass/vendor/linux_musl-x64-83/binding.node
Caching binary to /root/.npm/node-sass/5.0.0/linux_musl-x64-83_binding.node
> #fortawesome/fontawesome-common-types#0.2.36 postinstall /app/node_modules/#fortawesome/fontawesome-common-types
> node attribution.js
Font Awesome Free 0.2.36 by #fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
> core-js#3.19.1 postinstall /app/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js:
> https://opencollective.com/core-js
> https://patreon.com/zloirock
> https://paypal.me/zloirock
> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> ejs#2.7.4 postinstall /app/node_modules/ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
> core-js#2.6.12 postinstall /app/node_modules/raf-manager/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> #fortawesome/free-brands-svg-icons#5.15.4 postinstall /app/node_modules/#fortawesome/free-brands-svg-icons
> node attribution.js
Font Awesome Free 5.15.4 by #fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
> #fortawesome/free-solid-svg-icons#5.15.4 postinstall /app/node_modules/#fortawesome/free-solid-svg-icons
> node attribution.js
Font Awesome Free 5.15.4 by #fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
> node-sass#5.0.0 postinstall /app/node_modules/node-sass
> node scripts/build.js
Binary found at /app/node_modules/node-sass/vendor/linux_musl-x64-83/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for dns#0.1.5: wanted: {"node":">= 0.10.0 < 0.11.0"} (current: {"node":"14.17.0","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: dns#0.1.5
npm WARN notsup Unsupported engine for tomahawk#0.1.5: wanted: {"node":">= 0.8.0 < 0.11.0"} (current: {"node":"14.17.0","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: tomahawk#0.1.5
npm WARN notsup Unsupported engine for hawk#0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"14.17.0","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: hawk#0.10.2
npm WARN notsup Unsupported engine for hoek#0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"14.17.0","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: hoek#0.7.6
npm WARN notsup Unsupported engine for boom#0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"14.17.0","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: boom#0.3.8
npm WARN notsup Unsupported engine for cryptiles#0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"14.17.0","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: cryptiles#0.1.3
npm WARN notsup Unsupported engine for sntp#0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"14.17.0","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: sntp#0.1.4
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #fortawesome/vue-fontawesome#2.0.6 requires a peer of #fortawesome/fontawesome-svg-core#~1 || >=1.3.0-beta1 but none is installed. You must install peer dependencies yourself.
npm WARN request-promise-native#1.0.9 requires a peer of request#^2.34 but none is installed. You must install peer dependencies yourself.
npm WARN request-promise-core#1.1.4 requires a peer of request#^2.34 but none is installed. You must install peer dependencies yourself.
added 1815 packages from 726 contributors and audited 1819 packages in 64.473s
95 packages are looking for funding
run `npm fund` for details
found 92 vulnerabilities (14 low, 35 moderate, 41 high, 2 critical)
run `npm audit fix` to fix them, or `npm audit` for details
Removing intermediate container a7f62007da83
---> 6d342fed97bc
Step 6/13 : COPY . .
---> 11ec260a395b
Step 7/13 : RUN npm run build
---> Running in 90b0c3e10671
> portfolio-vpoujade#0.1.0 build /app
> vue-cli-service build
- Building for production...
Removing intermediate container 90b0c3e10671
---> 1635da3cea2f
Step 8/13 : FROM nginx:stable-alpine as production-stage
---> e1ccef1fb908
Step 9/13 : COPY ./nginx_config/nginx.conf /etc/nginx/nginx.conf
---> Using cache
---> d4839c3fabf3
Step 10/13 : RUN rm -rf /usr/share/nginx/html/*
---> Using cache
---> f78f258f926c
Step 11/13 : COPY --from=build-stage /app/dist /usr/share/nginx/html
ERROR: Service 'portfolio' failed to build: COPY failed: stat app/dist: file does not exist
And when I deploy the application with the docker-compose up --build -d command, at step 12:
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
, I get the error
ERROR: Service 'portfolio' failed to build: COPY failed: stat app/dist: file does not exist
Thank you in advance!

Testcafe fails on Jenkins built

I've made everything from https://devexpress.github.io/testcafe/documentation/guides/continuous-integration/jenkins.html. But builds fails always:
node --version
v14.2.0
npm --version
6.14.4
grunt --version
grunt-cli v1.2.0
bower --version
1.8.8
npm install testcafe testcafe-reporter-xunit
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
core-js#2.6.11 postinstall /var/lib/jenkins/jobs/testcafe/workspace/node_modules/core-js
node -e "try{require('./postinstall')}catch(e){}"
npm WARN saveError ENOENT: no such file or directory, open '/var/lib/jenkins/jobs/testcafe/workspace/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/var/lib/jenkins/jobs/testcafe/workspace/package.json'
node_modules/.bin/testcafe chrome tests/smokeTest.js -r xunit:res.xml -s takeOnFails=true
/tmp/jenkins4618268829523592648.sh: 20: /tmp/jenkins4618268829523592648.sh: node_modules/.bin/testcafe: not found
Build step 'Execute shell' marked build as failure
Recording test results
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
What am I doing wrong?

Errors installing vue/cliapp under docker

I want to install my #vue/cli 4.0.5 app under docker and using https://medium.com/#jwdobken/vue-with-docker-initialize-develop-and-build-51fad21ad5e6 link :
I modified the command line : modified node source from 11-alpine and renamed project name and installed the project, but running command
yarn serve
I got error that serve was not found :
me#athoe:/mnt/_work_sdb8/wwwroot/lar/VApps/DOCKER_TEST$ mkdir vtaskproject && cd "$_" && docker run --rm -v "${PWD}:/$(basename `pwd`)" -w "/$(basename `pwd`)" -it node:11-alpine sh -c "yarn global add #vue/cli && vue create ."
Unable to find image 'node:11-alpine' locally
11-alpine: Pulling from library/node
e7c96db7181b: Already exists
0119aca44649: Pull complete
40df19605a18: Pull complete
82194b8b4a64: Pull complete
Digest: sha256:8bb56bab197299c8ff820f1a55462890caf08f57ffe3b91f5fa6945a4d505932
Status: Downloaded newer image for node:11-alpine
yarn global v1.15.2
[1/4] Resolving packages...
warning #vue/cli > #vue/cli-ui > vue-cli-plugin-apollo > apollo > git-parse > babel-polyfill > core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
warning #vue/cli > #vue/cli-ui > vue-cli-plugin-apollo > apollo > git-parse > babel-polyfill > babel-runtime > core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
[2/4] Fetching packages...
info fsevents#1.2.11: The platform "linux" is incompatible with this module.
info "fsevents#1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.21.1", while you're on "1.15.2".
info To upgrade, run the following command:
$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
success Installed "#vue/cli#4.1.1" with binaries:
- vue
Done in 32.17s.
? Your connection to the default yarn registry seems to be slow.
Use https://registry.npm.taobao.org for faster installation? Yes
Vue CLI v4.1.1
? Generate project in current directory? Yes
Vue CLI v4.1.1
? Please pick a preset: default (babel, eslint)
? Pick the package manager to use when installing dependencies: Yarn
Vue CLI v4.1.1
��� Creating project in /vtaskproject.
��� Installing CLI plugins. This might take a while...
yarn install v1.15.2
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#1.2.11: The platform "linux" is incompatible with this module.
info "fsevents#1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
success Saved lockfile.
Done in 77.43s.
���� Invoking generators...
���� Installing additional dependencies...
yarn install v1.15.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#1.2.11: The platform "linux" is incompatible with this module.
info "fsevents#1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 24.82s.
��� Running completion hooks...
���� Generating README.md...
���� Successfully created project vtaskproject.
���� Get started with the following commands:
$ yarn serve
me#athoe:/mnt/_work_sdb8/wwwroot/lar/VApps/DOCKER_TEST/vtaskproject$ yarn serve
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'serve'
serge#athoe:/mnt/_work_sdb8/wwwroot/lar/VApps/DOCKER_TEST/vtaskproject$ yarn --version
0.32
I see that on successfull installation newly created project dir was selected.
Also in the provided article next was :
Dockerfile The Dockerfile is identical to the given example in the
documentation. Only the build-stage is split up into an install-stage
and a build-stage, since we don’t need to build when we are
developing!
But the thin is I do not see any Dockerfile file in the created project : https://imgur.com/a/mKrdFgi as I expected.
Had Dockerfile be there and how move next ?
$ lsb_release -d; uname -r; uname -i
Description: Ubuntu 18.04.3 LTS
4.15.0-72-generic
x86_64
$ docker --version
Docker version 19.03.5, build 633a0ea838

Getting npm ERR! exited with error code: 128

I tried 'RNVectorIcons' package in my react native project using the following link react-native-vector-icons.I used pod install command in my terminal.But I got the following error in my terminal window.
Analyzing dependencies
Fetching podspec for `RNVectorIcons` from `../node_modules/react-native-vector-icons`
Downloading dependencies
Installing RNVectorIcons (4.6.0)
Installing React (0.11.0)
[!] /bin/bash -c
set -e
npm install --production
npm WARN deprecated connect#2.8.3: connect 2.x series is deprecated
npm WARN deprecated babel-core#5.8.21: Babel 5 is no longer being maintained. Upgrade to Babel 6.
npm WARN deprecated graceful-fs#3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated line-numbers#0.2.0: Copy its ~20 LOC directly into your code instead.
npm WARN deprecated tough-cookie#1.2.0: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated coffee-script#1.6.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated formatio#1.1.1: This package is unmaintained. Use #sinonjs/formatio instead
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/facebook/react.git
npm ERR!
npm ERR! undefined
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/macmini1/.npm/_logs/2018-06-21T12_59_11_182Z-debug.log
my package.json file look like the following:
{
"name": "sample",
"version": "0.0.1",
"private": true,
"scripts": {
"gulp": "gulp"
},
"dependencies": {
"eslint": "4.19.1",
"eslint-config-airbnb": "16.1.0",
"eslint-config-airbnb-base": "12.1.0",
"eslint-config-rallycoding": "3.2.0",
"eslint-import-resolver-webpack": "0.10.0",
"eslint-plugin-import": "2.12.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-react": "7.8.2",
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-vector-icons": "4.6.0",
"react-navigation": "2.3.1"
},
"devDependencies": {
"babel-jest": "23.0.1",
"babel-preset-react-native": "4.0.0",
"jest": "23.1.0",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
debug.log file is
1609 verbose stack Error: exited with error code: 128
1609 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:12:19)
1609 verbose stack at ChildProcess.emit (events.js:182:13)
1609 verbose stack at maybeClose (internal/child_process.js:961:16)
1609 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
1610 verbose cwd /Users/macmini1/Library/Caches/CocoaPods/Pods/Release/React/0.11.0-ab1a2
1611 verbose Darwin 17.0.0
1612 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production"
1613 verbose node v10.4.1
1614 verbose npm v6.1.0
1615 error Error while executing:
1615 error /usr/bin/git ls-remote -h -t git://github.com/facebook/react.git
1615 error
1615 error undefined
1615 error exited with error code: 128
1616 verbose exit [ 1, true ]
How to solve this issue?
Could you provide the contents of the debug log? Did you only experience this issue since adding this package?
Can you also post the content of your package.json file?
Do also please have look at this question/solution, it does seem like the problem you're having: react-native init AwesomeProject unable to connect to github.com
Update
It could be related to the way github is being accessed. Could you try running the following command before trying it again?
git config --global url."https://".insteadOf git://

Bower 0.8.5 seems to be stuck

I updated from 0.8.0 (I guess) or later to 0.8.5 and bower seems stuck when i do a simple bower install. It happens on my machine and with my cloudbees hosted jenkins.
I tried to do a bower clean-cache, a bower install --force and a rm -rf ~/.bower with no luck.
It always gets stuck on copying instructions such as :
bower copying /home/bigx/.bower/cache/require/34f0965def4ee39276726c265c9162b6
or any other lib, there is no pattern.
I've got the following when I try to reinstall bower (only on my machine not on cloudbees):
npm WARN unmet dependency /usr/lib/node_modules/modulus/node_modules/prompt/node_modules/winston requires pkginfo#'0.2.x' but will load
npm WARN unmet dependency /usr/lib/node_modules/modulus/node_modules/prompt/node_modules/pkginfo,
npm WARN unmet dependency which is version 0.3.0
And here is my component.json
{
"dependencies": {
"angular": "~1.0.5",
"require": "~2.1.4",
"jquery": "~1.9.1",
"angular-sanitize": "~1.0.5",
"foundation": "http://foundation.zurb.com/files/foundation-3.2.5.zip",
"less.js": "~1.3.3",
"font-awesome": "~3.0.2"
},
"devDependencies": {
"angular-mocks": "~1.0.5"
}
}
Any idea?
Regards,
Xavier
Ok so it's a bug of the unzip library used by bower
See here: https://github.com/twitter/bower/issues/314

Resources