Skip to content

fix: It does not work in module structure. #21

@ramazansancar

Description

@ramazansancar

🐛 The bug

file://------/node_modules/.pnpm/@next-devtools+core@0.3.0-b_950081b16bd148b95e0a39fde9b645c2/node_modules/@next-devtools/core/dist/es/plugin.mjs:23
import { loadEnvConfig } from '@next/env';
         ^^^^^^^^^^^^^
SyntaxError: Named export 'loadEnvConfig' not found. The requested module '@next/env' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@next/env';
const { loadEnvConfig } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:431:15)

🛠️ To reproduce

🌈 Expected behavior

ℹ️ Additional context

Next.js: 15.3.2
@next-devtools/core: 0.3.0-beta.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions