2

I am on Ubuntu 20.04. I am trying to install a syllable counting program from source.

Ref: https://github.com/words/syllable

From readme.md

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.'' running the command:

$ node --version
v10.19.0

so i try to install a newer version of node but it fails:

~$ curl -fsSL deb.nodesource.com/setup_12.x | sudo -E bash - ## Installing the NodeSource Node.js 12.x repo... ## Populating apt-get cache... + apt-get update E: Malformed entry 1 in list file /etc/apt/sources.list.d/nodesource.list (Component) E: The list of sources could not be read. Error executing command, exiting – 

any help?!

1 Answers1

0

Please open URL: https://github.com/nodesource/distributions/blob/master/README.md#debinstall

For example, to install NodeJS 17+, you can follow the below instructions

# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
sudo apt-get install -y nodejs

And given URL containes more helpful information. I would suggest going through it.

Thanks.

Raja G
  • 102,391
  • 106
  • 255
  • 328
  • mee@mee-Inspiron-3543:~$ curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -

    Installing the NodeSource Node.js 12.x repo...

    Populating apt-get cache...

    • apt-get update

    E: Malformed entry 1 in list file /etc/apt/sources.list.d/nodesource.list (Component) E: The list of sources could not be read. Error executing command, exiting

    – brane stormer Jan 25 '22 at 03:25
  • @StamatisDiamantopoulos Its a different issue. Generally if you could google, you will figure it out. – Raja G Jan 25 '22 at 11:59