Ok so my issue is that when I install a NPM package via the terminal (Using NPM and node) the dependencies section gets deleted after I restart RMMZ. After downloading the package and installing, everything is working fine and dandy, but I just noticed that in the package.json, the dependencies are not there. What I noticed is, that when RMMZ is closed and restarted, it deletes the dependencies section of the package.json and the file goes back as it was by default.
Steps to replicate (This was tested on a Mac but I can verify if it happens on Windows if needed)
1. Download and install NodeJS.
2. Start terminal and install any package via
3. It downloads everything as it should (creates a package-json.lock, create a node_modules adding the necessary files and writes to the dependency section in the package.json file, the one that is created by default)
4. Close RM and start it again.
5. The dependency section on the package.json is not there anymore, it goes back to how it was by default. The package-json.lock and node_modules is still there.
I am not sure if this was a pattern that was made that way on purpose or not, but it's a pain to keep track of packages for a project this way.
If a better explanation is needed, I can try to write this post again. English is not my native language, and I just wrote what came out of my head.
Steps to replicate (This was tested on a Mac but I can verify if it happens on Windows if needed)
1. Download and install NodeJS.
2. Start terminal and install any package via
Code:
npm i <package>
4. Close RM and start it again.
5. The dependency section on the package.json is not there anymore, it goes back to how it was by default. The package-json.lock and node_modules is still there.
I am not sure if this was a pattern that was made that way on purpose or not, but it's a pain to keep track of packages for a project this way.
If a better explanation is needed, I can try to write this post again. English is not my native language, and I just wrote what came out of my head.