I'm trying to use an npm package that I published. I have it installed and the files are present and up to date in node_modules, but when I try to import it like so:
import Message from 'discord-helper-lib';
I get the following error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'C:\path\to\code\node_modules\discord-helper-lib' imported from C:\path\to\code\api\GameUpdater.js
The package itself has the following package.json:
{
"name": "discord-helper-lib",
"version": "2.0.2",
"description": "Discord Helper Library",
"type": "module",
"scripts": {},
"dependencies": {
"emoji-regex": "^9.2.2"
}
}
and the class I'm trying to import is defined as follows:
export default class Message {
constructor(text, messageReplyDetails) {
//..
}
}
Is there anything else I have to do to set up a module as an npm package to import it like others? Not sure if there's configuration or other requirements4