Error Code:
Cannot find module './jsnode_modules/user-info/index.js' Require stack: c:\Users\(username)\Documants\RMMZ\(filepath)\/index.html
Context:
so for a few days now I've been toying around and looking through other threads and over that time I've done the node install and run through the npm install requirements to get this to work the error code the game is returning is above.
Basically what I'm looking to do is grab the os user name to break the fourth wall a little and to that end for ease of coding later I'm trying to grab the os user name and then set that user name to the 10th actor (which is reserved for this purpose) using a variable with the following script below, I'm doing this so that rather than use \V[n] I can use \N[n] which I'm already doing a bunch since I'm allowing the player to input their own name.
var userInfo = require('./js/node_modules/user-info/index.js'); $gameActors.actor(10).setName(userInfo().username);
However, no matter what I try I can't seem to get it to work it just keeps giving the same error and I'm now at the point where I'm stumped because I know the problem is likely right in my face I just can't see it.
Any help given with this is greatly appreciated and I will say I consider myself a total noob to scripting just a noob with a light background in IT so not your average user either again thank you to anyone who can help with this.
Related Forum Post: Read player Username script? (I.e. the post I looked through to get started on this)
Cannot find module './jsnode_modules/user-info/index.js' Require stack: c:\Users\(username)\Documants\RMMZ\(filepath)\/index.html
Context:
so for a few days now I've been toying around and looking through other threads and over that time I've done the node install and run through the npm install requirements to get this to work the error code the game is returning is above.
Basically what I'm looking to do is grab the os user name to break the fourth wall a little and to that end for ease of coding later I'm trying to grab the os user name and then set that user name to the 10th actor (which is reserved for this purpose) using a variable with the following script below, I'm doing this so that rather than use \V[n] I can use \N[n] which I'm already doing a bunch since I'm allowing the player to input their own name.
var userInfo = require('./js/node_modules/user-info/index.js'); $gameActors.actor(10).setName(userInfo().username);
However, no matter what I try I can't seem to get it to work it just keeps giving the same error and I'm now at the point where I'm stumped because I know the problem is likely right in my face I just can't see it.
Any help given with this is greatly appreciated and I will say I consider myself a total noob to scripting just a noob with a light background in IT so not your average user either again thank you to anyone who can help with this.
Related Forum Post: Read player Username script? (I.e. the post I looked through to get started on this)

