You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
$ node main.cjs
1
(node:8464) Warning: require() of ES modules is not supported.
require() of C:\Users\sunny\Documents\code\esmbug\module.js from C:\Users\sunny\Documents\code\esmbug\main.cjs is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package
scope as ES modules.
Instead rename module.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\Users\sunny\Documents\code\esmbug\package.json.
Observations:
The program is running fine except for the warning message.
The warning only appears when the program is running for the first time. It does not reappear, unless node_modules/.cache directory is deleted.
Node 12.13.1 is the first time this warning appears; it did not appear in Node 12.13.0.
fregante, que-etc, jacob-fueled, tommyZZM, gotbahn and 14 morehyper145