npm install issues - react native project - mac - node.js

I am trying to clone a remote react-native project but I am getting errors when running the npm install command to download all the dependencies in the package.json folder.
I am in the same root directory where the package.json file is.
This is what I get when running npm install:
when I try doing npm install --force or npm install --legacy-deps I get:
I've tried uninstalling node reinstalling to the LTS and current version.
This is the process I followed when trying to install the dependencies:
clone remote repo
npm init
npm install
I am not quite sure what else to do any help would be greatly appreciated.

First you need to get in project directory then install the node packages
cd <ProjectName>
npm install

Related

npm install failing . how to install without error

Npm install is not completed due to some errors.
I;m expecting the npm install successfully completed and ran this local project.
According to your error message, you need python installed.
You can install that from here. https://www.python.org/downloads/
Install python 2.7.1.
If this doesnt help, than post your package.json and your node version and the operating system where you run npm install.
And in that case, post again the error after you installed python.
also run
npm cache verify
rm -rf node_modules
rm package-lock.json // or yarn.lock if you use yarn
npm i
last will clean up your installation.
After installing python, in a new terminal. (important you open a new terminal)
python --version
npm cache clean in your terminal and please check the version of the node and angular in your machine and fix the version which matches your project then again install the npm npm i

Laravel Compilation "Error: Cannot Find PATH/node_modules/laravel-mix/.."

When I run commands like:
npm run dev
npm run watch
to compile my project. I receive an error that says the laravel-mix directory does not exist.
Error: Cannot find module 'PATH/node_modules/laravel-mix/setup/webpack.config.js'
I have deleted the node_modules directory and used npm install to attempt to get it to install properly and it still is not there. "Laravel-mix" is in the package.json file as a dependency, so to my knowledge running npm install or npm install laravel-mix should do the trick, but it isn't working. Any information about this would be greatly appreciated.
npm -v 6.14.1
node -v 12.16.2
Have you already run the following?
npm install laravel-mix
npm install cross-env

How to install Electron from a custom mirror

I'm trying to install electron version 6.0.10 using yarn but getting "error":
read ECONNRESET" at \node_modules\electron\install.js:49.
As per the existing stackoverflow and github help, I have to install electron from a different mirror.
How to do that?
I can use npm if an npm specific solution exists.
Electron can be installed from a different mirror using electron-download npm package.
Install electron-download using npm (for me yarn didn't work for its installation).
npm install -g electron-download
Use electron-download to download the zip of electron from a custom repository.
electron-download --mirror=https://npm.taobao.org/mirrors/electron/ --version=6.0.10
//Change the version accordingly
Now, you can simply run the command in the project directory to install all packages by
yarn
Or
npm install
Or can install electron individually by
npm install electron
In all cases npm or yarn will check for the zip of electron in local workspace and install that.

installing node but missing all packages in node_modules

On the Mac, after installing node with:
brew install node
The only package that showed up in /usr/local/lib/node_modules is npm. My previous installation of node contained a bunch of packages such "express, apn, http2, ws, etc."
Any ideas?
There was not a package.json either.
When you install node you only get npm, those other packages you mention, were installed using
# probably with sudo
npm install -g {package}
The package.json is created when you run:
npm init
It has nothing to do with node installation.
If you wish to start a new project:
mkdir project
cd project
npm init
npm install {package-name} {other-package}
And now you will have a node_modules folder inside project/ and a package.json with {package-name} & {other-package} as dependencies

NPM Install is not installing dependencies

I'm attempting to install the Ushahidi V3 Client. I've been following the install process up until when I need to build the project from the source repo using npm and gulp - both of which I've had zero experience with. Whenever I run sudo npm install in the project directory, the process runs without complaints. However, when I run npm ls to verify that dependencies have been downloaded, I get a bunch of dependencies listed out as being missing.
How do I get npm to resolve all of these dependencies?
System Details
OS Ubuntu 14.04 (Trusty)
Node JS v0.12.9
NPM v3.5.1
What I've tried
Removing node_modules folder and re-running sudo npm install as referenced in this SO answer for a similar question: npm Gulp dependencies missing, even after running npm install
Uninstalling and reinstalling node and npm
#Strainy, as your research :D
It was a combination of running as sudo and not having the build-essentials.
That's why you should not use sudo npm
Follow these steps:
try npm uninstall. and then try npm install.
Also If it still doesn't work.
Try:
npm install -g npm-install-missing
or
npm-install-missing
For further reading, click here.

Resources