How to execute Javascript code with libraries?

How can I run this simple code snippet example?

const chai = import('chai');
const should = chai.should();

const number = 5;
number.should.be.a('number');
number.should.equal(5);

I have installed nodejs and also installed chai then tried to execute with code runner in the terminal but it shows me following error:

enter image description here