expo.dev (cloud service) add flags to npm install - npm

The following command eas build --platform ios --profile=production is executed to build the local expo project to expo.dev (cloud service)
During the install dependency phase of expo.dev (cloud service) in the image below, the following error is received:
[stderr] npm ERR! Fix the upstream dependency conflict, or retry
[stderr] npm ERR! this command with --force, or --legacy-peer-deps
The question is how can I add flag --force to expo.dev(cloud service) such that when it installs dependencies it executes npm install --force instead of npm install
Image Of Error From expo.dev :

Related

Heroku Deployment Error: npm ERR! Host key verification failed. NextJS/ExpressJS App

I am attempting to deploy my Next.js/Express,js backend app to Heroku via GitHub, however, I keep receiving the following error:
If anyone can please help me resolve this issue, that would be highly appreciated!
Thanks.
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.17.5...
Using default npm version: 6.14.14
-----> Installing dependencies
Installing node modules
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git#github.com/securedeveloper/js-xlsx.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.ScCS4/_logs/2021-08-22T17_21_36_340Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
I don't know if this is a good solution, but after removing package-lock.json and pushing again the error disappeared

foundation for emails can't create new project with npm error

I'm new to foundation and trying to start foundation for emails sass version. I installed foundation-cli by npm globally with this version:
Foundation CLI version 2.2.5
Then I cd to an empty folder and try start a tester project by the following command
foundation new --framework emails
The project setup failed:
Downloading the project template... Done downloading!
Installing dependencies...
npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0':
unknown revision or path not in the working tree. npm ERR! git
rev-list -n1 4.0: Use '--' to separate paths from revisions, like
this: npm ERR! git rev-list -n1 4.0: 'git [...] --
[...]' npm ERR! git rev-list -n1 4.0:
There were some problems during the installation.
✓ New project folder created. ✗ Node modules not installed. Try
running npm install manually. ✓ Bower components installed.
so I cd to the newly created project folder and npm install. It still failed.
npm ERR! code 1 npm ERR! Command failed: /usr/bin/git checkout 4.0 npm
ERR! error: pathspec '4.0' did not match any file(s) known to git. npm
Can anyone give me a hint how to resolve it??
The problem is that there was once an 4.0 tag for Gulp but it was deleted. Just run npm i gulp#next --save-dev or npm i gulp#4.0.0 --save-dev.
It was fixed in https://github.com/zurb/foundation-zurb-template/commit/a4472d7fc2409b43bbdc4df4dead7eb5e8e0e691 (see the change in package.json).
I had the same error.
First install gulp manually following these steps
https://gulpjs.org/getting-started.html.
Then if you get an error saying VCBuildtools arent't installed. Install them via
choco install vcbuildtools
After that it should work.
Try the manual install from here:
https://github.com/zurb/foundation-emails-template#manual-setup
Use Yarn instead of npm
Worked for me on a few different machines.

npm ERR! 404 Not Found: pinkie-promise

I'm trying to install Ionic Pro, and I am getting this error while pushing through live deploy..
Any help would be gladly appreciated
npm install --quiet --no-optional
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: pinkie#2.0.4 (node_modules/pinkie):
npm WARN 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: pinkie#https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz
npm ERR! code E404
npm ERR! 404 Not Found: pinkie-promise#https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz
npm ERR! A complete log of this run can be found in:
npm ERR! /home/gitlab-runner/.npm/_logs/2018-01-06T18_55_47_426Z-debug.log
npm install --quiet --no-optional failed
Running after script...
$ run "clean-up"
Running Stage clean-up for Job: 5211838
ERROR: Job failed: exit status 1
A little under a year ago, the package "leftpad" broke NPM builds all over the world because the author pulled it from the public repository.
The same is happening today, for "pinkie-promise". The author's NPM account (#floatdrop) was deleted, opening opportunities for malware in all the packages he's written.
Dependent builds include Ionic and (in my case) node-sass.
Resources:
NPM issue: https://github.com/npm/registry/issues/255
Incident report: https://status.npmjs.org/incidents/41zfb8qpvrdj
pinkie-promise issue: https://github.com/floatdrop/pinkie-promise/issues/4
Dependent packages: https://www.npmjs.com/browse/depended/pinkie-promise
All of #floatdrop's repositories: https://github.com/floatdrop?tab=repositories
I was able to work around this by installing pinkie-promise by pointing to their github repo.
npm install https://github.com/floatdrop/pinkie-promise.git
Solution to make project build work again
Since this dependency is not available on npm registry,
one will have to do the following to make it work.
Follow these steps to make things work again.
rm -rf node_modules/
rm -rf package-lock.json
npm i https://github.com/floatdrop/pinkie-promise.git
In the end you will see the output
+ pinkie-promise#2.0.1

mocha & chai dependencies when running npm install

I want to run an Ionic app with Grunt (Yeoman Ionic)
To do this the script runs npm install and bower install. Then run grunt to compile and then grunt serve to serve it on local host.
npm install does not create peer dependencies with Mocha and Chai which is making bower install abort like so:
Running "karma:continuous" (karma) task
Warning: Cannot find module 'mocha' Use --force to continue.
Aborted due to warnings.
I ran npm install -g chai mocha then npm install and got the same
npm WARN karma-mocha#0.1.10 requires a peer of mocha#* but none was installed.
npm WARN karma-chai#0.1.0 requires a peer of chai#* but none was installed.
Even though this is a warning it is yielding errors when running yo ionic:
npm WARN karma-chai#0.1.0 requires a peer of chai#* but none was installed.
npm WARN karma-mocha#0.1.10 requires a peer of mocha#* but none was installed.
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/css' -> '/Users/donjohnson/ionicNom/app/app/styles'
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/js' -> '/Users/donjohnson/ionicNom/app/app/scripts'
ERROR: Error: ENOENT: no such file or directory, rename '/Users/donjohnson/ionicNom/app/app/img' -> '/Users/donjohnson/ionicNom/app/app/images'
This makes grunt serve open a browser page with nothing in it :(
npm install --save-dev mocha chai to your project (without the -g).
As of version 3, npm does not automatically install peerDependencies
It seems that with NPM 3, the dependencies won't be installed by default, use this to update:
npm install chai#*
npm install mocha#*
and then use:
npm install
bower install

How to install Yeoman on an Openshift Tomcat server

I have a Java spring as server stack and with angularJS for the UI stack.
Part of the build process I need Jenkins to run Grunt build to optimize the UI before the build process starts.
I have tried to install Yeoman on the Jenkins instance but since I am not the administrator I am getting Access errors.
[\> npm install -g yo
npm ERR! Error: EACCES, mkdir '/var/lib/openshift/<ID>/.npm'
npm ERR! { [Error: EACCES, mkdir '/var/lib/openshift/<ID>/.npm']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/var/lib/openshift/<ID>/.npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
You're getting an access error because you're trying to do a global install - that's what the -g flag does. In other words, you're attempting to install yeoman in a system-wide location instead of locally, which requires root permissions.
Also, you shouldn't need to install yeoman in a production environment - yeoman just does app scaffolding. If you're using yeoman locally, it should have added grunt, and any grunt plugins you need, to the package.json file in your app. Make sure the package.json file is checked in, then as part of the build process, you can run npm install, then grunt build.
I'm not sure how Jenkins affects the build process, but normally, npm install will run automatically when you push a new commit to your OpenShift app.