NodeJS- Cannot install nodemon - node.js

I am trying to install nodemon but everytime I got stuck at the same part.
It get a response, but didn't end the job.
I have to stop it after some minutes with the state bellow.
I already try another modules and all of them install correctaly.
Could someone say what could be wrong or any other similar module?
Thanks.
Your environment has been set up for using Node.js 0.10.28 (x64) and npm.
C:\Users\>npm instal -g nodemon
npm http GET https://registry.npmjs.org/nodemon
npm http 304 https://registry.npmjs.org/nodemon

This has happened to me with other modules after canceling the install mid-way once, then when I do it again, it will get stuck.
I had to clear the cache before trying again.
npm cache clean
npm install -g nodemon

I've made it but I installed from the source and I did a git clone from the master branch, so try this out:
Create a folder:
mkdir nodemon
cd nodemon
clone the repo:
git clone https://github.com/remy/nodemon.git
then do an install in the folder you have created
npm install
Type nodemon just to make sure you have installed it.
in the case you got an erorr like this
Error: EACCES, permission denied '/home/[username]/.config/configstore/update-notifier-nodemon.yml'
You don't have access to this file.
try this
sudo chown [username]:[username] /home/[username]/.config/configstore/ -R

Related

"ELIFECYCLE" Error after running 'npm install && npm run dev'

I'm trying to create an imageboard by building from cloned github repositories. I'm using npm for this, but for reasons I'm not quite sure of, I'm met with errors that I will post below.
I've tried to alleviate this by running: npm cache clean --force, followed by: rm -rf node_modules, and then followed by: rm -rf package-lock.json.
After all of this, I ran npm install && npm run dev once more, and yet still, I was met with the exact same errors.
Initial commands used:
git clone https://gitgud.io/millchan/Millchan.git
npm install && npm run dev
First off, I do: git clone https://gitgud.io/millchan/Millchan.git, and then I do: cd ~/millchan. The "millchan" folder is the one created from cloning the repositories.
Then, afterwards...
After running npm install: https://pastebin.com/kus7p6Cy
(had to post on pastebin because stackoverflow's AI thinks it's spam)
After running npm run dev: https://pastebin.com/KbvggQP2

How to install node/npm so that 'sudo npm' works on an ec2 instance?

Answer: Follow the steps in this link
http://iconof.com/blog/how-to-install-setup-node-js-on-amazon-aws-ec2-complete-guide/
I am running ubuntu on an ec2 instance and need to sudo npm install something. I am given the error that sudo npm is not recognized.
There is a previous thread that is 7 years old. On EC2: sudo node command not found, but node without sudo is ok I tried every solution there and nothing worked.
I think the problem is using NVM to install npm and node. How can I install these so that they are compatible with sudo? Thanks!
You can run the following command
sudo yum install nodejs npm --enablerepo=epel
For more, you can also install using the following link also: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html
Second Approach:
Install NPM
git clone https://github.com/isaacs/npm.git
cd npm
sudo env PATH=$HOME/local/node/bin:$PATH make install
Now you can install npm packages and run javascript node files as usual!
sudo npm install forever -g
sudo npm install express -g
Resource Link: http://www.wisdomofjim.com/blog/how-to-install-node-and-npm-on-an-ec2-server
You can use NVM. You can follow this link which gives proper steps to install node on ec2 instance.
I dont know if my problem is the same as yours (i think is similar), but i tried to run "sudo npm install" on a amazon linux ec2 machine and it gave me the "sudo: npm: command not found" type of problem.
I followed the instructions recommended by AWS to install node and NPM (https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html).
I solve this by changing the owner and group of the directory and files (package.json and package-lock.json):
chown ec2-user:ec2-user nameDir
and then i run npm install again. It worked!

'npm EER! code 1' When installing dependencies using `npm install --production`

I am using flightplan to deploy my node.js application to my server. I run the command fly production in my CLI to deploy my app to the server. It does rsync fine, but when it comes to installing dependencies, I get the following error:
I made sure that I have sudo privileges on my server for this user and npm is definitely installed as it gives the version number when I run the command npm -von my server. I have tried to run npm install --production myself on the server as the deploy script does and I get the same error, meaning it is something to do with installing dependencies. Potentially, it could be because in my flightplan.js, when it runs the command git ls-files to get the files to copy across. it includes all the node_modules even though i've made sure that node_modules is in the .gitingore file.
Does anyone have experience with flightplan npm module/or know why my npm install isn't working on my server?
(I edited out my server IP address from the picture)
Thanks in advance!
I found that if I removed the node_modules folder by running command rm -rf node_modules/ then committed this to github, then re-ran npm install and then my call to fly production worked successfully.

Grunt Bower jquery.min.map Error. Setting up my first MEAN app

I'm trying to setup a MEAN environment. I keep getting this error:
Error: ENOENT, no such file or directory
'/home/user/app1/bower_components/jquery/dist/jquery.min.map'
I've tried on CentOS7 and RHEL6, on CentOS I tried installing nodejs from source and also from epel. On RHEL6 I used this method to setup nodejs:
curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs
npm install -g mean-cli
mean init app1
cd app1 && node install
grunt
<error>
When I tried bower install I got Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular-mocks.git", exit code of #128 on bower install. To fix this run this command git config --global url."https://".insteadOf git:// I'm not sure if it is persistent.
That fixed the problem on RHEL6 but it didn't fix it on CentOS7. I went back to CentOS7 and tried again and it seems to have worked... I'm just going to move on and not question it for now.
You'll need to run bower install to download those dependencies. You'll have bower.json and maybe package.json (since you are running npm install) in your project root specifying the project dependencies.

Making "sudo npm install --save-dev gulp" in Maverics nothing's happens

I'm trying to test Gulp and I find this problem.
I installed Gulp globally with: sudo npm install -g gulp.
Then I was created the folder: mkdir my-gulp
cd my-gulp
And the I try to do this: sudo npm install --save-dev gulp
It seems work fine, no errors, but my folder my-gulp continues empty.
I can see in console, this line:
gulp#3.8.6 ../../node_modules/gulp
And I thinkig the problem is here "../../", I think it must be "gulp#3.8.6 node_modules/gulp"
What do you think? Maybe is something about $PATH?
First, you should never run npm via sudo for local packages. (In fact, you shouldn't run it as root ever, but that's a different, more complex issue to solve.)
Second, you need to initialize NPM before you can install packages. It sounds like you didn't do this.
There's two ways:
If you have an existing package.json, which contains the required information about a project, you can copy it into your folder, then edit in a text editor of your choice to get started. If the package.json includes existing dependencies, you can either remove them, or run npm i in the folder to install them.
If you are starting fresh, run npm init to set up a new package.
Once you have a valid package.json, you can install packages into your application.
As to why you are seeing ../../gulp, I'm guessing you have a package.json further up the file tree somewhere.

Resources