This question requires more context, but here's how to think about solving the question. Whenever you have a 'MODULE_NOT_FOUND' error, the culprit is almost always your package.json file.
Whatever code you're implementing in your .js
depends on an npm module/package that is referenced in package.json, but (possibly) hasn't been installed (ie, there's no corresponding node_modules
folder for the problem.
It's a bit odd that the require stack is empty, as that would have given us some insight into the problem.
Consider doing as I've described:
- Review the error and see if you can find anything in the require stack pointing to the issue.
- Check your package.json for all installed packages
- To be doubly sure, re-run
npm install
- Make sure your JS file is in the same directory as the package.json file
Let me know how this goes!