Files
node/lib/internal
Joyee Cheung b7284ed099 module: do not warn for typeless package.json when there isn't one
It was intended that warnings should only be emitted for an
existing package.json without a type. This fixes a confusing
warning telling users to update /package.json when there are
no package.json on the lookup path at all, like this:

[MODULE_TYPELESS_PACKAGE_JSON] Warning: ... parsed as an ES module
because module syntax was detected; to avoid the performance penalty
of syntax detection, add "type": "module" to /package.json

Drive-by: update the warning message to be clear about
reparsing and make it clear what's actionable.

PR-URL: https://github.com/nodejs/node/pull/54045
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-12 11:06:35 +02:00
..
2024-08-05 11:15:41 -03:00
2024-07-16 12:01:10 +02:00
2024-04-29 22:46:31 +02:00
2024-07-16 12:01:15 +02:00
…
2024-08-14 08:14:51 +02:00
2024-07-16 12:06:56 +02:00
2024-08-30 15:52:14 -03:00
2024-02-19 01:19:44 +00:00
2024-07-16 12:01:15 +02:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.