docker module.js:550 throw err; ^ - docker

I try to run the application in Docker, with the installation of dependencies, from a private repository, but I get this error.
Start docker container docker run -p 3000:80
module.js:550
throw err;
^
Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/src/server.js:5:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
my Dockerfile
install using YARN
FROM node:8
ENV YARN_VERSION 1.16.0
ARG SSH_PRIVATE_KEY
RUN mkdir -p /root/.ssh
RUN echo $SSH_PRIVATE_KEY > /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa
RUN ssh-keyscan -H bitbucket.org >> /etc/ssh/ssh_known_hosts
RUN curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz
COPY package*.json ./
COPY . .
EXPOSE 3000
CMD [ "node", "server.js" ]
package.json
{
"name": "test-home-nodejs",
"description": "",
"version": "1.17.2",
"author": "",
"scripts": {
"start": "node server.js",
"test": "NODE_ENV=test node node_modules/mocha/bin/mocha --recursive -R mocha-bamboo-reporter",
"watchTests": "NODE_ENV=test ./node_modules/gulp/bin/gulp.js watch-pot"
},
"repository": {
"type": "git",
"url": "git#bitbucket.org:igorbell/test-home.git"
},
"dependencies": {
"async": "^1.1.0",
"autosize": "^4.0.0",
"babel-core": "^6.25.0",
"babel-preset-env": "^1.6.1",
"babel-preset-es2015": "^6.24.1",
"babelify": "^7.3.0",
"bluebird": "^3.0.0",
"body-parser": "^1.9.0",
"bower": "^1.3.3",
"browserify": "^13.0.1",
"browserify-shim": "^3.8.11",
"chalk": "^1.1.0",
"chosen-js": "^1.7.0",
"client-sessions": "^0.7.0",
"cloudinary": "~1.9.0",
"coffeeify": "2.0.1",
"compression": "^1.4.3",
configured according to this instruction
enter link description here
When using the NMP, there was almost the same error
UPDATE in dockerfile
ARG NODE_ENV=qa
ENV NODE_ENV=${NODE_ENV}

Related

How to deploy a Sveltekit App using a Dockerfile?

I'm trying to deploy my Sveltekit App in Railway
Whenever I try to run
docker run --publish 8000:8000 my_project
I get back
> my-project#0.0.1 build
> vite build
sh: vite: not found
This is my dockerfile
# syntax=docker/dockerfile:1
FROM node:19.4.0-alpine3.16
ENV NODE_ENV=production
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install
RUN npm install dotenv
RUN npm install #directus/sdk
RUN npm install vite
COPY . .
CMD [ "npm", "run", "build" ]
This is my package.json file
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
"test": "playwright test",
"test:unit": "vitest",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"dependencies": {
"#directus/sdk": "^10.3.1",
"dotenv": "^16.0.3"
}
}
Script and dependencies above
The devDependencies are the following, at least the ones I found competent
"devDependencies": {
"#sveltejs/adapter-auto": "^1.0.0",
"#sveltejs/kit": "^1.0.0",
"svelte": "^3.54.0",
"svelte-check": "^2.9.2",
"vite": "^4.0.0",
"vitest": "^0.25.3"
},

how can I solve Electron EACCES installation error under Docker?

I have a problem installing Electron in a docker container. Here is the log:
# npm ci --force --unsafe-perm=true --allow-root
npm WARN using --force Recommended protections disabled.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated #braintree/sanitize-url#3.1.0: Potential XSS vulnerability patched in v6.0.0.
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.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /workspaces/cassiopee/nghyd/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! Error: EACCES: permission denied, stat '/root/.cache/electron/2b84ab10611c34771b1b29e2390eaa8b69e5185e5065252938d8eb00e4c17a3d/electron-v19.0.7-linux-x64.zip'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-07-11T09_36_51_171Z-debug-0.log
I originally install with npm ci --force and, as you can see, I tried a solution (--unsafe-perm=true --allow-root) proposed in many forums without success.
The Docker image is based on Debian Bullseye.
Thanks for the help.
Edit:
Here is the Dockerfile:
FROM debian:bullseye
LABEL maintainer="xxx"
# base packages
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y \
locales \
curl \
build-essential \
wget \
git \
rsync \
net-tools iproute2 inetutils-ping sudo
# UTF-8 locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# nodejs
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get update \
&& apt-get install -y \
nodejs
# python3
RUN apt-get install -y \
python3 \
python3-pip \
python3-setuptools \
&& python3 -m pip install mkdocs python-markdown-math mkdocs-material
# chromium and procps (e2e)
RUN apt-get install -y chromium procps
# pandoc & LaTeX for PDF doc
RUN apt-get install -y \
pandoc \
texlive \
latexmk \
texlive-latex-extra \
texlive-bibtex-extra
# wine
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key \
&& apt-key add winehq.key \
&& echo "deb https://dl.winehq.org/wine-builds/debian/ buster main" > /etc/apt/sources.list.d/winehq.list \
&& dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y software-properties-common apt-transport-https \
&& wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/Release.key \
&& apt-key add Release.key \
&& add-apt-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10 ./' \
&& apt-get update \
&& apt-get install -y --install-recommends winehq-stable
# java & Android SDK
ENV SDK_URL="https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip" \
ANDROID_HOME="/usr/local/android-sdk" \
ANDROID_VERSION=28 \
ANDROID_BUILD_TOOLS_VERSION=28.0.3
RUN apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main' \
&& apt-get update \
&& apt-get install -y \
openjdk-8-jdk \
gradle \
&& mkdir "$ANDROID_HOME" .android \
&& cd "$ANDROID_HOME" \
&& mkdir cmdline-tools \
&& cd cmdline-tools \
&& curl -o sdk.zip $SDK_URL \
&& unzip sdk.zip \
&& rm sdk.zip \
&& export PATH=$PATH:$ANDROID_HOME/cmdline-tools/tools/bin \
&& yes | sdkmanager --licenses \
&& $ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --update \
&& $ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
"platforms;android-${ANDROID_VERSION}" \
"platform-tools" \
&& echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/" >> /root/.bashrc \
&& echo "export ANDROID_HOME=${ANDROID_HOME}" >> /root/.bashrc \
&& echo "export ANDROID_SDK_ROOT=${ANDROID_HOME}" >> /root/.bashrc \
&& echo "export PATH=${PATH}:$ANDROID_HOME/cmdline-tools/tools/bin" >> /root/.bashrc
WORKDIR /build
Excerpt of the package.json file:
"dependencies": {
"#angular-devkit/build-angular": "^14.0.4",
"#angular/animations": "^14.0.4",
"#angular/cdk": "^14.0.4",
"#angular/common": "^14.0.4",
"#angular/compiler": "^14.0.4",
"#angular/core": "^14.0.4",
"#angular/flex-layout": "^14.0.0-beta.40",
"#angular/forms": "^14.0.4",
"#angular/material": "^14.0.4",
"#angular/platform-browser": "^14.0.4",
"#angular/platform-browser-dynamic": "^14.0.4",
"#angular/router": "^14.0.4",
"#ngx-matomo/tracker": "^3.0.0",
"#types/pako": "^1.0.4",
"#types/sprintf-js": "^1.1.2",
"angular2-chartjs": "^0.5.1",
"angular2-hotkeys": "^13.1.0",
"chartjs-plugin-zoom": "^0.7.7",
"cordova-android": "^10.1.2",
"cordova-plugin-advanced-http": "^3.3.1",
"cordova-plugin-app-version": "^0.1.14",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-device": "^2.1.0",
"cordova-plugin-file": "^7.0.0",
"cordova-plugin-file-opener2": "^3.0.5",
"cordova-plugin-local-notification": "^0.9.0-beta.2",
"cordova-plugin-whitelist": "^1.3.5",
"core-js": "^3.23.3",
"file-saver": "^2.0.5",
"he": "^1.2.0",
"jalhyd": "file:../jalhyd",
"katex": "^0.16.0",
"material-design-icons": "^3.0.1",
"mathjax": "^3.2.2",
"mermaid": "^8.8.0",
"ngx-markdown": "^14.0.1",
"ngx-material-file-input": "^4.0.0",
"ngx-webstorage-service": "^5.0.0",
"pako": "^2.0.4",
"primeng": "^14.0.0-rc.1",
"roboto-fontface": "^0.10.0",
"rxjs": "^7.5.5",
"screenfull": "^6.0.2",
"svg-pan-zoom": "^3.6.1",
"tslib": "^2.4.0",
"xlsx": "^0.18.5",
"zone.js": "~0.11.6"
},
"devDependencies": {
"#angular-devkit/core": "^14.0.4",
"#angular-eslint/eslint-plugin": "^14.0.0",
"#angular/cli": "^14.0.4",
"#angular/compiler-cli": "^14.0.4",
"#angular/language-service": "^14.0.4",
"#compodoc/compodoc": "^1.1.11",
"#types/file-saver": "^2.0.5",
"#types/jasmine": "~4.0.3",
"#types/jasminewd2": "^2.0.10",
"#types/node": "^18.0.1",
"#typescript-eslint/eslint-plugin": "^5.30.5",
"#typescript-eslint/eslint-plugin-tslint": "^5.30.5",
"#typescript-eslint/parser": "^5.30.5",
"codelyzer": "^6.0.2",
"cordova": "^11.0.0",
"electron": "^19.0.7",
"electron-builder": "^23.1.0",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.26.0",
"fs-extra": "^10.1.0",
"jasmine-core": "~4.2.0",
"jasmine-spec-reporter": "~7.0.0",
"protractor": "~7.0.0",
"ts-node": "^10.8.2",
"typescript": "~4.7.4",
"webpack-dev-server": "^4.9.3"
},

Local env with Docker for nuxtjs

I'm trying to create a local env with docker for a nuxtjs project.
This is my docker-compose.yml:
version: '3.3'
services:
frontend:
container_name: frontend
restart: unless-stopped
working_dir: /app
build:
dockerfile: Dockerfile
volumes:
- ./application:/app
ports:
- "3001:3000"
environment:
HOST: 0.0.0.0
command: npm run dev
This is my Dockerfile
FROM alpine:3.15
RUN apk update
RUN apk add --no-cache --update make
RUN apk add --no-cache --update python3 py3-pip
RUN apk add --no-cache --update nodejs npm
RUN apk add --no-cache --update g++
WORKDIR /app
COPY application /app
RUN npm install -g nuxt
RUN NODE_ENV=development npm install
RUN npm install
ENV HOST 0.0.0.0
EXPOSE 3001
When I run docker-compose up --build
✖ Nuxt Fatal Error Error: Cannot find module '#nuxtjs/eslint-module'
Require stack:
/usr/local/lib/node_modules/nuxt/node_modules/#nuxt/core/dist/core.js
This is my package.json
{
"name": "demo",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"lint": "npm run lint:js",
"lintfix": "npm run lint:js -- --fix",
"lintreport": "npm run lint:js -- -f node_modules/eslint-html-reporter/reporter.js -o eslint-report.html",
"test": "jest"
},
"dependencies": {
"#nuxtjs/auth-next": "5.0.0-1637745161.ea53f98",
"#nuxtjs/axios": "^5.13.6",
"#nuxtjs/sitemap": "^2.4.0",
"axios": "^0.24.0",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"vue": "^2.6.14",
"vue-server-renderer": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46.0"
},
"devDependencies": {
"#babel/eslint-parser": "^7.16.3",
"#nuxt/test-utils": "^0.2.2",
"#nuxtjs/eslint-config": "^8.0.0",
"#nuxtjs/eslint-module": "^3.0.2",
"#nuxtjs/google-fonts": "^1.3.0",
"#nuxtjs/tailwindcss": "^4.2.1",
"#vue/test-utils": "^1.3.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^27.4.4",
"eslint": "^8.4.1",
"eslint-html-reporter": "^0.7.4",
"eslint-plugin-nuxt": "^3.1.0",
"eslint-plugin-vue": "^8.2.0",
"express": "^4.17.2",
"jest": "^27.4.5",
"postcss": "^8.4.4",
"supertest": "^6.1.6",
"vue-jest": "^3.0.4"
}
}
Looks like that the devDependencies are not installed.
Any idea how to run the prject?
You can use this hack to avoid mounting your node_modules and overriding the ones in the container.
volumes:
- ./application:/app
- /app/node_modules
ref: Docker-compose: node_modules not present in a volume after npm install succeeds

npm install is taking (30+) minute

npm install is taking (30+) minutes in server which runs on debian 9.8.
I want to know what might cause this?
I've already tried npm set progress=false and npm config set registry http://registry.npmjs.org/ but none of it helped.
I'm running it in docker container.
this is my package.json
{
"name": "name",
"version": "1.0.0",
"main": "server/server.js",
"engines": {
"node": ">=6"
},
"scripts": {
"lint": "eslint .",
"start": "nodemon .",
"client": "cd client && npm start",
"test": "mocha"
},
"dependencies": {
"babel-eslint": "^10.0.1",
"compression": "^1.0.3",
"cors": "^2.5.2",
"eslint-config-react-app": "^4.0.0",
"eslint-plugin-flowtype": "^3.7.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^1.6.0",
"express-jwt": "^5.3.1",
"express-winston": "^3.2.0",
"helmet": "^3.10.0",
"html-element": "^2.3.0",
"jwks-rsa": "^1.5.1",
"libxmljs": "^0.19.5",
"loopback": "^3.22.0",
"loopback-boot": "^2.6.5",
"loopback-component-explorer": "^6.2.0",
"loopback-connector-mongodb": "^4.2.0",
"loopback-connector-rest": "^3.4.1",
"node": "8.16.0",
"node-blockly": "^1.0.36",
"serve-favicon": "^2.0.1",
"strong-error-handler": "^3.0.0",
"winston": "^3.2.1"
},
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^3.17.1",
"eslint-config-loopback": "^8.0.0",
"loopback-supertest-models": "^3.5.0",
"mocha": "^6.1.4",
"nodemon": "^1.19.0",
"supertest": "^4.0.2"
},
"repository": {
"type": "",
"url": ""
},
"license": "UNLICENSED",
"description": "description"
}
and this is my Dockerfile
FROM node:10.9.0-alpine as builder
RUN mkdir -p /app/server
WORKDIR /app/server
COPY package*.json /app/server/
#COPY yarn* /app/server/
# Disables npm progress bar
RUN npm set progress=false
# Set npm registry to http://registry.npmjs.org
RUN npm config set registry http://registry.npmjs.org/
#! Install the build requirements for bcrypt
RUN apk update && apk upgrade \
&& apk --no-cache add --virtual git builds-deps build-base \
&& apk --no-cache add make gcc g++ python \
&& npm install --save node-gyp node-pre-gyp \
&& rm -rf /var/cache/apk/*
# && yarn add node-gyp node-pre-gyp
# Install dependencies
# RUN yarn install --production=true
RUN npm install --production
# Copy the server files over
COPY . /app/server/
RUN apk del make gcc g++ python
FROM node:10.9.0-alpine
# Create and set the working directory
RUN mkdir -p /app/server
WORKDIR /app/server
# Copy the server from the build container
COPY --from=builder /app/server /app/server
CMD ["node", "."]

Lint with Jenkins

I have this package.json:
{
"name": "lahmacun",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"lint": "standard --verbose | snazzy",
"lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
"fixcode": "standard --fix",
"clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean",
"clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android",
"newclear": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean && npm i",
"test": "ava",
"test:watch": "ava --watch",
"coverage": "nyc ava && nyc report --reporter=html && open coverage/index.html || xdg-open coverage/index.html",
"android:build": "cd android && ./gradlew assembleRelease",
"android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease",
"android:hockeyapp": "cd android && ./gradlew assembleRelease && puck -submit=auto app/build/outputs/apk/app-release.apk",
"android:devices": "$ANDROID_HOME/platform-tools/adb devices",
"android:logcat": "$ANDROID_HOME/platform-tools/adb logcat *:S ReactNative:V ReactNativeJS:V",
"android:shake": "$ANDROID_HOME/platform-tools/adb devices | grep '\\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} shell input keyevent 82",
"precommit": "npm run git-hook",
"prepush": "npm run git-hook",
"git-hook": "npm run lint -s && npm test -s"
},
"dependencies": {
"apisauce": "^0.10.0",
"format-json": "^1.0.3",
"lodash": "^4.17.2",
"querystringify": "0.0.4",
"ramda": "^0.23.0",
"react": "15.4.2",
"react-native": "0.42.0",
"react-native-animatable": "^1.1.0",
"react-native-config": "^0.2.1",
"react-native-device-info": "^0.10.0",
"react-native-drawer": "^2.3.0",
"react-native-i18n": "^1.0.0",
"react-native-router-flux": "^3.37.0",
"react-native-vector-icons": "^4.0.0",
"react-navigation": "^1.0.0-beta.6",
"react-redux": "^5.0.2",
"redux": "^3.6.0",
"redux-persist": "^4.1.0",
"redux-saga": "^0.14.3",
"reduxsauce": "0.4.1",
"seamless-immutable": "^7.0.1"
},
"devDependencies": {
"ava": "^0.18.2",
"babel-eslint": "^7.1.1",
"babel-preset-es2015": "^6.18.0",
"enzyme": "^2.6.0",
"husky": "^0.13.1",
"ignite-animatable": "^0.3.1",
"ignite-dev-screens": "^2.0.0-beta.1",
"ignite-i18n": "^0.1.1",
"ignite-ir-boilerplate-2016": "^0.2.0",
"ignite-vector-icons": "^0.2.1",
"mockery": "^2.0.0",
"nyc": "^10.1.2",
"react-addons-test-utils": "^15.3.1",
"react-dom": "^15.4.0",
"react-native-mock": "^0.3.1",
"reactotron-apisauce": "^1.7.0",
"reactotron-react-native": "^1.7.0",
"reactotron-redux": "^1.7.0",
"reactotron-redux-saga": "^1.7.0",
"snazzy": "^6.0.0",
"standard": "8.6.0"
},
"ava": {
"files": [
"Tests/**/*.js",
"!Tests/Setup.js"
],
"require": [
"babel-register",
"babel-polyfill",
"react-native-mock/mock",
"./Tests/Setup"
],
"babel": "inherit"
},
"standard": {
"parser": "babel-eslint",
"globals": [
"describe",
"it",
"fetch",
"navigator",
"__DEV__",
"XMLHttpRequest",
"FormData",
"React$Element"
]
},
"config": {
"ghooks": {
"pre-commit": "if [ -d 'ignite-base' ]; then cd ignite-base; fi; npm run lint"
}
}
}
And when I run following command locally, it works absolutely fine.
lint --xml test.xml *
But in Jenkins after npm install in the shell script, I get this error after the errors have been displayed successfully:
03:56:48 ✖ 115484 problems
03:56:48
03:56:48 npm ERR! Linux 4.4.0-62-generic
03:56:48 npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lint" "__tests__" "android" "app.json" "components" "data.js" "images" "index.android.js" "index.ios.js" "ios" "node_modules" "package.json" "react-native-packager-cache-4d9c2999" "reports" "yarn.lock"
03:56:48 npm ERR! node v7.7.2
03:56:48 npm ERR! npm v4.1.2
03:56:48 npm ERR! code ELIFECYCLE
03:56:48 npm ERR! MyTest1#0.0.1 lint: `standard --verbose | snazzy "__tests__" "android" "app.json" "components" "data.js" "images" "index.android.js" "index.ios.js" "ios" "node_modules" "package.json" "react-native-packager-cache-4d9c2999" "reports" "yarn.lock"`
03:56:48 npm ERR! Exit status 1
03:56:48 npm ERR!
03:56:48 npm ERR! Failed at the MyTest1#0.0.1 lint script 'standard --verbose | snazzy "__tests__" "android" "app.json" "components" "data.js" "images" "index.android.js" "index.ios.js" "ios" "node_modules" "package.json" "react-native-packager-cache-4d9c2999" "reports" "yarn.lock"'.
03:56:48 npm ERR! Make sure you have the latest version of node.js and npm installed.
03:56:48 npm ERR! If you do, this is most likely a problem with the MyTest1 package,
03:56:48 npm ERR! not with npm itself.
03:56:48 npm ERR! Tell the author that this fails on your system:
03:56:48 npm ERR! standard --verbose | snazzy "__tests__" "android" "app.json" "components" "data.js" "images" "index.android.js" "index.ios.js" "ios" "node_modules" "package.json" "react-native-packager-cache-4d9c2999" "reports" "yarn.lock"
03:56:48 npm ERR! You can get information on how to open an issue for this project with:
03:56:48 npm ERR! npm bugs MyTest1
03:56:48 npm ERR! Or if that isn't available, you can get their info via:
03:56:48 npm ERR! npm owner ls MyTest1
03:56:48 npm ERR! There is likely additional logging output above.
03:56:48
03:56:48 npm ERR! Please include the following file with any support request:
03:56:48 npm ERR! /root/.jenkins/jobs/smayle/workspace/npm-debug.log
03:56:48 Build step 'Execute shell' marked build as failure
03:56:48 Finished: FAILURE
All I am doing in Jenkins in the shell script is this:
npm install
npm run lint *

Resources