DEP0128: 具有无效主条目和 index.js 文件的模块


类型: 仅文档(支持 --pending-deprecation

具有无效 main 条目(例如 ./does-not-exist.js)并且在顶层目录中也有 index.js 文件的模块将解析 index.js 文件。 这已被弃用,并且会在未来的 Node.js 版本中引发错误。

Type: Documentation-only (supports --pending-deprecation)

Modules that have an invalid main entry (e.g., ./does-not-exist.js) and also have an index.js file in the top level directory will resolve the index.js file. That is deprecated and is going to throw an error in future Node.js versions.