Reputation: 69
I install nodejs using this command: sudo apt install nodejs Then when installation is complete I tried to run some script but has error
[my script command]
When I run this script using nodejs the error occur
My ubuntu version and Nodejs version:
Upvotes: 0
Views: 37
Reputation: 285
Uninstall that nodejs version
sudo apt-get remove nodejs
Install latest version of nodejs
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
After this try to run your file
node yourfile
Upvotes: 1