Having trouble running a docker image 'quorra not found' - docker

After allot of ado I was able to build my dockerimage, but when I try and run it I get the following error:
$ docker run swipeimage
> uswipe-merchant#0.0.1 dev /var/app
> NODE_ENV=development quorra ride --watch --env development
sh: quorra: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! uswipe-merchant#0.0.1 dev: `NODE_ENV=development quorra ride --watch --env development`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the uswipe-merchant#0.0.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-12-05T10_01_14_455Z-debug.log
I tried adding RUN npm install quorrato my docker file to make sure quorra is installed but still get an error.

Finally got it, I was looking at the quorra docs, and I changed
RUN npm install quorra
to
RUN npm install -g quorra-cli
Now it works!!!
Thanks All

Related

How do I install a node module in a Cypress Docker container?

In the path ~/cypress-dockerfile I have the following Dockerfile:
FROM cypress/base:10
RUN npm install --save-dev cypress
WORKDIR /node_modules
RUN npm install sqlite3
RUN $(npm bin)/cypress verify
RUN $(npm bin)/cypress run
I then run docker build . but it stops with the following:
Step 4/6 : RUN npm install sqlite3
---> Running in 13de6b7a4fcf
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
> sqlite3#5.0.0 install /node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: not found
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! sqlite3#5.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the sqlite3#5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-08-07T13_28_54_118Z-debug.log
The command '/bin/sh -c npm install sqlite3' returned a non-zero code: 1
I think that I may be in the wrong directory but I am not sure, any help would be appreciated.

/usr/bin/env: 'node\r': No such file or directory

I'm having this issue when running the following command:
docker-compose run npm run dev
I'm in cmd terminal in win10 and I think the error is related to CRLF/LF end of lines.
The following is the whole error :
> # dev /var/www
> npm run development
> # development /var/www
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
/usr/bin/env: 'node\r': No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the # development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-19T13_04_14_658Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-19T13_04_14_679Z-debug.log
The \r in node\r is probably the key: you saved some file using Windows line endings (CRLF) whereas Linux expect LF line endings.
As I'm not accustomed with NodeJs, I can't really tell you which file use wrong line ending here.

Runing npm run deploy:twilio-cli causes the following error

C:\Users*****\Documents\Sparo\twilio-video-app-react> npm run deploy:twilio-cli
twilio-video-app-react#0.1.0 deploy:twilio-cli C:\Users*****\Documents\Sparo\twilio-video-app-react
cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build
'cross-env' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! twilio-video-app-react#0.1.0 deploy:twilio-cli: cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the twilio-video-app-react#0.1.0 deploy:twilio-cli script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users*****\AppData\Roaming\npm-cache_logs\2020-04-14T16_44_28_493Z-debug.log

Permission denied error when I run ionic build ios command?

When I ran
ionic build ios
I get the following error.
sh: /Users/imac/Documents/TGF_IOS/node_modules/.bin/ionic-app-scripts: Permission denied
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "ionic:build" "--"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world#0.0.0 ionic:build: `ionic-app-scripts build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the ionic-hello-world#0.0.0 ionic:build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/imac/Documents/TGF_IOS/npm-debug.log
Any help will be appreciated..
Thanks in advance
Finally i have got the solution.
First step check if you have permission (read/write) to the project folder.
Secondly, run this command with sudo,
sudo npm install #ionic/app-scripts#latest --save-dev
This will install latest app-script and wll fix the issue.

Electron inside Docker with X11 Forwarding - No Protocol Specified

I am attempting to run the Electron Quick Start in a Docker container with X11 forwarding. I've got all the appropriate packages figured out but when I run the container I get No protocol specified. I'm not sure what I'm missing to get it to work.
Dockerfile
FROM node
RUN apt-get update
RUN apt-get -y install libgtkextra-dev libgconf2-dev libnss3 libasound2 libxtst-dev libxss1 libx11-xcb-dev
WORKDIR /srv
ADD . .
RUN npm install
ENTRYPOINT ["npm", "start"]
Build and Run
docker build -t electron .
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY electron
Output
npm info it worked if it ends with ok
npm info using npm#4.1.2
npm info using node#v7.7.2
npm info lifecycle electron-quick-start#1.0.0~prestart: electron-quick-start#1.0.0
npm info lifecycle electron-quick-start#1.0.0~start: electron-quick-start#1.0.0
> electron-quick-start#1.0.0 start /srv
> electron .
No protocol specified
npm info lifecycle electron-quick-start#1.0.0~start: Failed to exec start script
npm ERR! Linux 4.8.0-41-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.7.2
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! electron-quick-start#1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-quick-start#1.0.0 start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-quick-start
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /srv/npm-debug.log
Q: What is the correct way of running Electron apps inside Docker?
In your host machine run xhost local:root then try running your container to run electron

Resources