Firstly open the terminal after that move to the root folder of your Nodejs Project then write the below command.
npm install --save-dev cucumber
After installing the cucumber then you can check the package name in the package.json file.
After installing the package, firstly you have to create a features folder at the root of your project.
after creating the folder you can create a file with .feature extension.
Run the cucumber test cases
Now write the test cases and run the test cases through the below command