Unable to install nodejs on

I’m starting from the circleci/golang image and have added a step to install nodejs .

like :

  - run:
      name: Setup Node.js & npm
      command: >
        sudo apt-get install -y nodejs

in a following step I would like to build the frontend however i get an error :

  - run:
      name: Build the Frontend
      command: >
        cd /go/src/github.com/xxxx/xxxx/deploy/frontend
        && npm install
        && npm run build

the error :

#!/bin/bash -eo pipefail cd /go/src/github.com/xxxx/xxxx/deploy/frontend && npm install && npm run build

/bin/bash: npm: command not found Exited with code 127