Skip to content

ExperimentalWarning: Importing JSON modulesΒ #51347

Open
@webdevnerdstuff

Description

Version

20.9.0 & 20.10.0

Platform

Darwin foobar.local 22.6.0 Darwin Kernel Version 22.6.0: Thu Nov 2 07:43:57 PDT 2023; root:xnu-8796.141.3.701.17~6/RELEASE_ARM64_T6000 arm64

Subsystem

No response

What steps will reproduce the bug?

  1. Clone repo https://github.com/webdevnerdstuff/vuetify-drilldown-table/tree/dev
  2. git checkout dev
  3. pnpm i
  4. npx cross-env NODE_OPTIONS="--trace-warnings" pnpm test:dev (same result with npm run test:dev)
  5. Notice the console is throwing a warning that seems unrelated to the actual code in the project.

How often does it reproduce? Is there a required condition?

Every time you run a package script it's throwing this warning in the console.

What is the expected behavior? Why is that the expected behavior?

It should not be throwing a warning if there is nothing that is being used in that warning. As it seems the trace shows the warnings coming from node:internal.

What do you see instead?

(node:12542) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
    at emitExperimentalWarning (node:internal/util:275:11)
    at ModuleLoader.jsonStrategy (node:internal/modules/esm/translators:453:3)
    at callTranslator (node:internal/modules/esm/loader:285:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:30)

Additional information

There are places in the code where I am importing a json file, but I also tested by removing all of those imports, and the output of the warning is the same. So I'm not sure where and/or why it's throwing this warning. Is this a false positive?

Metadata

Assignees

No one assigned

    Labels

    esmIssues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.loadersIssues and PRs related to ES module loaders

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions