sindresorhus / cli-boxes

Boxes for use in the terminal
MIT License
96 stars 8 forks source link

ExperimentalWarning while use node 20+ #11

Open tianyingchun opened 3 months ago

tianyingchun commented 3 months ago

(node:60053) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time (Use node --trace-warnings ... to show where the warning was created)

node : v20.12.2

tianyingchun commented 3 months ago

can we change .json to .ts exports?

millette commented 3 months ago

Instead of import json, should we prefer load-json-file instead?

fregante commented 3 months ago

Anyone reaching this issue via update-notifier can just remove it and reinstall it to fix it. The dependency was downgraded in boxen:

fregante commented 1 month ago

As of Node 22.9.0, this is still experimental: https://nodejs.org/api/esm.html#json-modules

Choices for users who want to avoid the warning:

Choices for Sindre:

Since all reports/pingbacks so far are related to update-notifier (which no longer uses the latest version of cli-boxes) it might be easier to wait it out (a year?)