I’m getting that message after installing express globally.
I went through most of the solutions related to the /.bash_profile file and about exporting the correct PATH, but it still nothing works.
I tried this solution https://superuser.com/a/1081802 and it worked on the terminal, but when I close it and tried to execute the command express followed by the file I wanted to use, it ended up showing the same message.
Please help!
So I was looking for other kinds of solutions, and I remembered that I installed via the website and not by home-brew. Just in case, I uninstalled it and installed node again.
I run this:
npm install express -g
npm install express-generator -g
And up to this point it is now working.
Related
I am a newbie to react-native and would like to start developing a react-native app.
I could have started developing by react-native-cli, but I heard there was something called Expo and a way to open an initial app with expo-cli.
I copied and pasted this code npm install -g eas-cli, but it gave me a huge long error message I put its screenshot below.
I have no idea about the system?? inside my computer.
I would be so grateful if anyone gives me a possible solution.
Thanks for your valuable time^^
=========== Edit ===========
So I read the first comment, and run this command on my Mac brew install nvm. It worked nicely and looked for more information for what to do from this point. Then I ran this command mkdir ~/.nvm, and I am stack now. I created a directory called .nvm, but so what from now??
Thanks a lot for taking your time to help me!!
You probably installed npm using sudo, or something like that.
I would recommend to install npm using nvm. It usually removes all those errors.
I recently tried to launch my project on a new computer. I downloaded the source code from its repository and ran npm install to get all the needed packages.
However, when I run npm start or expo start:web, I get the error:
Cannot find module '#expo/metro-config'
I ran npm install #expo/metro-config and the install run without issue, but I still get the “Cannot find module '#expo/metro-config'” error.
The only post I saw regarding this error recommends editing the metro.config.js but I do not use one.
I am on SDK 42, and the project launches fine on my other computer. Any idea what is happening?
FYI, I use to perform this whole operation without any issue until now.
UPDATE:
I ran npm install -g #expo/metro-config and now I get the error Cannot find module 'resolve-from'
So it looks like maybe running npm install -g expo-cli doesn't actually install all the necessary packages? Could it be the issue?
I managed to make it "work" (get other missing packages errors down the line) by reverting to expo-cli 4.7.3. Anything from 4.8.0 and above will cause the error.
Something else is that on a fresh npm install, after running npm install -g expo-cli, if I try to create a project with expo init, I will get the error Error: Cannot find module 'kleur'. Running npm install kleur fix it, but maybe that's also a clue.
I am trying to get rid of the following error message.
patch-package 6.2.2
Applying patches...
Error: Patch file found for package mongodb-query-parser which is not present at node_modules/mongodb-query-parser
This message appears when I try to install mongo-express. Locally this is no problem, because npm install keeps progressing after the error message.
But when I try to run it on gitlab-pipeline it exits the job.
Is there any workaround?
Temporary quick fix is to install mongo-express without the postinstall.
npm install mongo-express --ignore-scripts && npm install
That way the patch-package isn't called and at least the CI doesn't break. But I'm not sure how unsecure this is...
Hopefully going to be fix soon! I opened an issue
Cheers
I am running Windows 8.1 with node version 7.7.3 and npm version 4.1.2.
I have been working on an Angular tutorial without issues. At some point since finishing that tutorial I installed Python. I am not sure if it is related, but I have mentioned it just in case.
Today I am trying to create an Angular application and it hung without completing.
I did some research and it tells me to do this:
npm uninstall -g #angluar/cli
npm cache clean
npm install -g #angular/cli
The last command hangs at this point:
loadRequestedDeps: silly install loadAllDepsIntoIdealTree
I opened the command prompt "run as administrator" to run these commands.
Everything I try fails. I have connected to a completely different network to eliminate that as the problem and that didn't fix anything. I have uninstalled and reinstalled node.js and that hasn't fixed the problem either.
I can ping registry.npmjs.org just fine.
What is causing this error?
I finally found the answer! I ran the following command in the command window:
echo %temp%
It had 3 temp paths in there. I removed the two I didn't need and voila, it works!
I installed the Bower package for Sublime. It says Bower is installed, but when I try to install anything I get this warning:
bower could not be found in your $PATH. Install bower with npm install bower -g
I'm a noob when it comes to using Terminal, but I tried to install Bower there. But it comes back with:
-bash: npm: command not found
It appears this relates to Node, but I don't even know what that is or anything about it.
I'm on a Mac 10.6.8., using Sublime Text 2. If this solution requires going back into Terminal, please spell it our for me, because I am not comfortable using it.
Thanks in advance!
Okay, I figured it out myself. I installed Node—still don't know what it is exactly—but apparently I needed it. I found an installer package at http://nodejs.org/download/
Then I went back to Terminal and tried installing Bower again. Still didn't work. then I added sudo to the line and it appears to have worked.