Im on Ubuntu 14.04
I installed node
sudo apt-get install node
I installed npm
sudo apt-get install npm
I installed react-tools
sudo npm install -g react-tools
When I try:
jsx -h
I get no output. Any ideas what might be wrong? Likely pebcak but I would appreciate a hint.
I uninstalled everything and this time I installed the correct nodejs. Thx FakeRainBrigand.
This time I got:
/usr/bin/env: node: No such file or directory
I solved this with:
ln -s /usr/bin/nodejs /usr/bin/node
Related
I tried to install MongoDB on the ubuntu 20.04 and the used command are given below,
To create a mongodb-org-4.4.list file in the sources.list.d folder
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Updated the system,
sudo apt-get update
Install the MongoDB on my system,
sudo apt install mongodb-org
After running the above command I just faced an error and it was not install in ubuntu system and the error is given below, please concern who wanna to help me,
Reading package lists... Done
Building dependency tree
Reading state information... Done
mongodb-org is already the newest version (4.4.5).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Note: The error are also added in attached file.
Try like this
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
#Alex Blex, Please concern here,
>echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
>sudo apt-get update
>sudo apt install mongodb-org
After running the above command I also run apt --fix-broken install this command and it showed an error that is,
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Then I created an new director in my laptop as /var/lib/dpkg/lock-frontend But it's not solved.
Even I also run sudo apt-get --purge remove mongodb-org this command after your suggest and then run all the command again but it's again showed same problems.
And after running sudo apt-get --purge remove mongodb-org this command it showed below feedback, please concern here,
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Thanks, Everyone!
try this command :
sudo apt-get install -y mongodb-org
I use it to install MongoDB and it's working :
tuto : https://addi-kamal.medium.com/mongodb-iceberg-how-to-install-mongodb-on-ubuntu-server-9c5beea2c62
I am trying to setup a react project. It has lot of dependencies and while downloading one of module it is throwing this error. This is on windows.
pngquant failed to build, make sure that libpng-dev is installed
Output:
‼ unable to get local issuer certificate
pngquant pre-build test failed
compiling from source
pngquant pre-build test passed successfully
Error: pngquant failed to build, make sure that libpng-dev is installed
You didn't installed lib-png so that error is coming.Try to install lib-png first.
sudo apt-get install libpng-dev
npm install -g pngquant-bin
To expound more on #Mukesh's answer.
I experienced this issue when building a react project that uses the imagemin-pngquant package.
When I run npm install on the server I get the below error:
pngquant pre-build test failed
compiling from source
pngquant pre-build test passed successfully
Error: pngquant failed to build, make sure that libpng-dev is installed
Here's how I fixed it:
Install libpng-dev package on your machine/server:
sudo apt-get install libpng-dev
Add pngquant-bin package to your npm packages in the package.json file (if it doesn't yet exist):
"dependencies": {
.
.
.
"imagemin-pngquant": "^9.0.1",
.
.
.
}
OR
Run the command to install the pngquant-bin package:
npm install imagemin-pngquant --save // to install the latest
OR
npm install imagemin-pngquant#9.0.1 --save // to install a specific version
Note: You can try npm install imagemin-pngquant#5.0.1 --save if you encounter issues with the latest version.
Now everything should be fine if you install the npm packages and build the project again using:
npm install
npm run build
That's all.
I hope this helps
On Ubuntu you can try to fix it with apt-get install -y libpango1.0-dev command, worked for older node v6
I faced the same issue:
Solution
Step 1
sudo apt-get update -y
Step 2
sudo apt-get install -y libpng-dev
These two steps sorted out my issue and working fine.
This worked for me on Windows:
Run Windows PowerShell as Admin
npm install --global --production windows-build-tools
If you have made any previous npm installation attempt which you most likely had, clean everything and then do a fresh dependency installation:
rm node_modules -R
rm package-lock.json
npm install
Good luck!
I'm trying to work with AngularJS but I can't even get pass installing it via Terminal.
I enter this onto the command line
npm install -g #angular/cli
I get this as a result
- bash: npm: command not found
I seem to be getting this same error log on almost every command, the rest return nothing
I'm stumped as to why it's not working.
For reference I'm using OS X 10.9.5
Make sure you got node installed which comes with npm
https://nodejs.org/en/
You error looks like you don't even have node installed on your computer, first of all, you need to install node js on you computer, once you’ve installed Node.js, you can make sure you’ve got the very most recent version of npm using npm itself: sudo npm install npm -g.
Then you can continue your installation with the step below:
To install #angular/cli locally run npm install #angular/cli --save, while to install it globally run npm install -g #angular/cli.
But if it requires a root access, then you have to include the sudo which will then be sudo npm install -g #angular/cli.
I figured it out. I needed to adjust the .bash_profile by entering this
echo "export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" >> ~/.bash_profile
Thanks to everyone who gave advice :)
I'm getting this error when I run npm run test for a create-react-app application for the sample test provided. I tried looking for the EMFILE error but I'm unable to understand what's going wrong.
Error: Error watching file for changes: EMFILE
at exports._errnoException (util.js:1022:11)
at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)
I had the same issue and discovered watchman was not installed.
Run brew install watchman.
Issue is happening since watchman is not installed on your system.
On Linux, you need to do following
Install Watchman using following commands
git clone https://github.com/facebook/watchman.git
cd watchman/
git checkout v4.9.0
sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool
./autogen.sh
./configure
make
sudo make install
Execute tests
sudo npm test
I am trying to setup angular-seed application.
I have installed nodejs with sudo apt-get install nodejs
Installed npm with sudo apt-get install npm
Installed bower with sudo apt-get install bower -g
Installed nodejs-legacy with sudo apt-get install nodejs-legacy
Opened my angular-seed application, ran npm install. This ran perfectly without any errors.
To start the server, I'm trying to use npm start, but it is returning the following information and error.
> angular-seed#0.0.0 prestart /home/venki/Downloads/angular-seed
> npm install
> angular-seed#0.0.0 postinstall /home/venki/Downloads/angular-seed
> bower install
> angular-seed#0.0.0 start /home/venki/Downloads/angular-seed
> http-server -a localhost -p 8000 -c-1
sh: 1: http-server: not found
npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
I'm using Ubuntu 14.04 LTS. Please let me know if any further information is necessary.
I assumed that http-server will be installed by default by nodejs but it turns out that it doesn't.
I installed http-server using
sudo npm install -g http-server
Just ran npm start after this. That's it, the problem is solved.
I had to run both the following commands;
sudo npm install -g http-server
apt-get install nodejs-legacy
And then my program trying to use NPM operated correctly.
I installed nodejs-legacy using the following:
apt-get install nodejs-legacy
Then just run npm after this.