Extraneous Library Linkage

Extraneous Library Linkage

If your program calls functions in A that don't reference B then B is not required either at link or load time, assuming that the functions in A are in separate compilation units, which is usually the case for a library.

The linker will pull the functions from the library that C uses and since none of them call functions in B, B will not be needed.

How to fix eslint error - extraneous node/no-extraneous-require

Exactly as error description says

If a require()'s target is extraneous (it's not written in package.json), the program works in local, but will not work after dependencies are re-installed. It will cause troubles to your team/contributors. This rule disallows require() of extraneous modules.

But if it's how you need to do it anyway the you can add an exception in your rules

"rules": {
"node/no-extraneous-require": ["error", {
"allowModules": ["yourModule"]
}]
}

npm windows install globally results in npm ERR! extraneous

npm ERR! extraneous means a package is installed but is not listed in your project's package.json.

Since you're listing packages that have been installed globally, it's going to give you a lot of extraneous errors that can be simply ignored because most things installed globally will not be in your project's package.json.



Related Topics



Leave a reply



Submit