Clintuy
Clintuy

Reputation: 69

NodeJS Issue with Ubuntu server with Docker

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]

enter image description here

When I run this script using nodejs the error occur

enter image description here

My ubuntu version and Nodejs version:

enter image description here

Upvotes: 0

Views: 37

Answers (1)

Sai Kumar
Sai Kumar

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

Related Questions