MV How can I use npm in RPG Maker MV? (Changing desktop wallpaper)

First, I'm sorry for my bad English.

I don't know much about JavaScript.

https://forums.rpgmakerweb.com/index.php?threads/read-player-username-script.91546/
I read it.

I installed Node.js on my computer.

I typed into the Command Prompt and pressed enter:
npm install --save user-info
(source: https://github.com/sindresorhus/user-info)

When I used a script call, it worked.
var userInfo = require('./js/node_modules/user-info/index.js');

However, following the same process,

I typed into the Command Prompt and pressed enter:
npm install wallpaper
(source: https://www.npmjs.com/package/wallpaper)

When I used a script call, It didn't work.
var wallpaper = require('./js/node_modules/wallpaper/index.js');

(SyntaxError: Unexpected identifier)

What's the problem? How can I solve it?

I'll just play my game with friends. Please don't point out security issues or user experiences.
Moved to: Plugin Support

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-use-npm-in-rpg-maker-mv-changing-desktop-wallpaper.157520/