Gulp installation error on Laravel in Ubuntu - laravel

I run npm install gulp in Ubuntu. Show this error:
My Server is Ubuntu 16.04.
Framework is Laravel 5.6.
ERROR: npm is known not to run on Node.js v4.2.6
Node.js 4 is supported but the specific version you're running has
a bug known to break npm. Please update to at least 4.7.0 to use this
version of npm. You can find the latest release of Node.js at https://nodejs.org/
I run node -v show this message: v4.2.6
I run sudo apt-get install --only-upgrade nodejs show this message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (9.11.1-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
How to solve this problem?

Try this.. First, Uninstall completely nodejs and npm.
sudo apt remove nodejs npm
Then, reinstall it:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
Refer: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Try:
sudo apt-get update
sudo apt-get install nodejs (you already have node so this step is probably not required)
sudo npm install -g gulp
That should resolve your issue.

Related

"Yarn: command not found" even after being installed [duplicate]

This question already has answers here:
yarn command not found after installing via npm
(8 answers)
Closed 1 year ago.
I'm trying to install metronic on my computer and for this I need to have yarn installed. So I ran the command :
npm install --global yarn
/Users/cbarrial/.npm-global/bin/yarn -> /Users/cbarrial/.npm-global/lib/node_modules/yarn/bin/yarn.js
/Users/cbarrial/.npm-global/bin/yarnpkg -> /Users/cbarrial/.npm-global/lib/node_modules/yarn/bin/yarn.js
+ yarn#1.16.0
updated 1 package in 0.376s
So I guess the installation is working fine but then if I try the yarn command I'm getting this :
yarn --version
-bash: yarn: command not found
I have no idea where the problem could come from, I already have the latest npm and node.js installed and working fine.
You can install yarn in the next way:
sudo apt-get install curl # Only if you don't have installed curl
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
This way is an alternative to install yarn on debian/ubuntu, but you can find the alternative installation for different operative systems in the official page for Yarn in the section Alternatives

Installing python-ldap fails with lber.h file not found in ubuntu 17.10 even after installing devel packages

I am trying to install python-ldap package using pip. I am getting the below error while executing pip install python-ldap. I tried installing the package corresponding to ubuntu 17.10 ( Artful ) as per this question but no luck yet. What package am I missing ?
Solution in the above stack overflow question is to install
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
But in 17.10 I could not see libsasl2-dev & libldap2-dev instead I could see packages libsasl-2-2& libldap-2.4-2. I installed those along with phthon-dev & libssl-dev. But still I am getting the below error.
Seems I am missing some package installation which has lber.h file in it.
Error I am getting :
In file included from Modules/LDAPObject.c:8:0:
Modules/constants.h:7:10: fatal error: lber.h: No such file or directory
#include "lber.h"
^~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Python version - 3.6.3
Pip version - 19.1.1
I have figured out the root cause myself. Issue seems to be the dev packages itself.
Need to install libsasl2-dev, libldap2-dev & libssl-dev. I was not able to see these packages in 17.10 as the main repository mirror urls are changed as the version is archived as per the below question.
https://askubuntu.com/questions/1141501/i-cant-run-sudo-apt-get-update-in-ubuntu-17-10
I have changed to 18.04 and after installing the above packages everything works great.
This worked for me:
apt-get update -y && apt-get install -y python3-dev libldap2-dev libsasl2-dev ldap-utils tox lcov valgrind

When I install odoo V9 it say me, "Could not execute command 'lessc'"?

When I try to install odoo_v9 it successfully install, and create demo database it also created, but after install demo database it give me error like "Could not execute command 'lessc'"....
Thanks in advance.
This error occurs almost everytime with a fresh installation of Odoo.
(Especially with Ubuntu 12.04)
First run these three commands in your terminal.
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
Then you install nodejs:
sudo apt-get install nodejs
You can then check version of nodejs using:
node -v
It should be at least greater than > 0.10
npm -v
Should return a version at least > 1.4
Then finally execute the following command, whick will update npm to a newer version as well as install the less plugin:
sudo npm install -g npm
sudo npm install -g less less-plugin-clean-css

Odoo-v9 installtion

I have installed odoo-9 successfully, but it need to install few more packages I think because odoo-9 is dependent on node-less.
Problem :
After installed odoo-9 screen will not render completely, so anyone knows the reason why this happen ?
There is no more help available for odoo-9 and it's dependent packages.
Already refereed:
odoo 9 on Ubuntu Server 14.04 LTS
Odoo forum
Issue has been resolved by installing less.
Less CSS via nodejs
on Linux, use your distribution's package manager to install nodejs and npm.
Important
In debian wheezy and Ubuntu 13.10 and before you need to install nodejs manually:
$ wget -qO- https://deb.nodesource.com/setup | bash -
$ apt-get install -y nodejs
In later debian (>jessie) and ubuntu (>14.04) you may need to add a symlink as npm packages call node but debian calls the binary nodejs
$ apt-get install -y npm
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Once npm is installed, use it to install less and less-plugin-clean-css:
$ sudo npm install -g less less-plugin-clean-css
For more help Click here
by the way thats a really outdated version of node.
instead of
wget -qO- https://deb.nodesource.com/setup | bash -
use
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
All the other instructions are the same.
You need to install nodejs and less for Ubuntu you need to run :-
sudo curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g less less-plugin-clean-css
after run your issue get resolve .
You can get more details tutorial about odoo installation here odoo Apache Ubuntu
You can chekout this also for dependency and configuration
Documentation

PhoneGap Mac CLI local install failed because of Node version

So I want to debug my Phonegap webapp locally in Xcode.
I follow the step here and here, and launch in MAC CLI
$ sudo npm install -g phonegap
BUT install failed and CLI result get lots of errors with the first one is :
engine phonegap#2.9.0rc1-0.12.0: wanted: {"node":">=0.10.0"} (current: {"node":"v0.8.8","npm":"1.1.59"})
I understand my node version is too old : 0.8.8
node --version
I try to update but I am stuck with those 2 methods here and both in errors for me :
BREW
Tried Homebrew but did not work :
$ brew upgrade node
Error: node-0.8.8 already installed
NPM
As I found here
Upgrading Node.js to latest version
How do I update Node.js?
$ sudo npm install -g n
$ sudo n stable
sudo: n: command not found
In fact my bash_profile was missing the path to the n module as I found here:
cannot install npm? problems generating application
Edit your ~/.bash_profile. Add this export somewhere.
export PATH=/usr/local/bin:$PATH:/usr/local/share/npm/bin
I had the same issue and fixed it by upgrading node with brew, I just run
brew install --upgrade node

Resources