Update:
npm pull request #6744 tries to move npm-debug.log
from cwd into the cache folder.
Original Answer:
There doesn't seem to be a way to do this. It is hardcoded:
In error-handler.js
if (wroteLogFile) {
log.error("", [""
,"Additional logging details can be found in:"
," " + path.resolve("npm-debug.log")
].join("\n"))
wroteLogFile = false
}
log.error("not ok", "code", code)
And other occurrences as well.
I don't think this flexibility would fit into npm
's philosophy see isaacs comment:
npm config set prefix
?
If you want to spell "node_modules" differently, sorry, no can do.
That's built into node-core. Changing that is tantamount to building a
completely different package manager.