in my nodejs project I created a local package like this
{
"name": "template-utils",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"amqp-connection-manager": "^4.1.14"
},
"devDependencies": {
"prettier": "^3.3.2"
}
}
"use strict";
module.exports = {
Logger: require("./log"),
Amqp: require("./amqp")
};
I have a script to copy the folder template-utils
with these files into ./lib of my main package (the one I run). I install it with this in package.json
"template-utils": "file:./lib/template-utils"
When I install, template-utils
is correctly inside my node_modules
with a link pointing at the folder in ./lib. However, if I do
const { Logger, Amqp } = require("template-utils");
Then Logger and Amqp are not recognized by Intellij and I don’t understand why.
I tried to check if it was related to Intellij folder exclusion but it doesn’t look like it’s the case. The local package also has its node_modules
from npm install
AOL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.