Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(node:23021) 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) 0.2.12 #240

Open
rockmandash opened this issue Jan 2, 2025 · 3 comments
Assignees

Comments

@rockmandash
Copy link

wangzhiyong@wangzhiyongdeMacBook-Pro ~ % repomix --version
(node:23021) 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)
0.2.12
wangzhiyong@wangzhiyongdeMacBook-Pro ~ % 

Everytime I type repomix --version this annoying error message shows up.

@roooxnode
Copy link

A simple workaround that worked for me was setting the NODE_OPTIONS environment variable to disable the experimental warning:

Windows (Powershell)

$env:NODE_OPTIONS="--disable-warning=ExperimentalWarning"
repomix

Alternatively, on Linux or macOS:

export NODE_OPTIONS="--disable-warning=ExperimentalWarning"
repomix

@rockmandash
This suppresses the warning whenever you run repomix. I hope it helps!

@yamadashy yamadashy self-assigned this Jan 11, 2025
@yamadashy
Copy link
Owner

Thank you @rockmandash for reporting this issue and @roooxnode for providing the workaround solution!
Sorry for the late response.

It seems this warning is occurring because the debug package (used via secretlint) is trying to load supports-color (ESM) using require().
debug-js/debug#912

I'll investigate this further.

@yamadashy yamadashy added the bug Something isn't working label Jan 11, 2025
@yamadashy
Copy link
Owner

I've investigated and found the root cause.

This seems to be an npm cli issue itself. The warning will be gone when you update to Node.js v23.4.0.
npm/cli#7857 (comment)

@yamadashy yamadashy removed the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants