I am getting a ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING error when using Nextjs 12.0.6
It fails in this file
/node_modules/next/dist/server/config.js
On this line
userConfigModule = await import((0, _url).pathToFileURL(path).href);
Unhandled Rejection at: Promise {
<rejected> TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified.
at new NodeError (node:internal/errors:371:5)
at exports.importModuleDynamicallyCallback (node:internal/process/esm_loader:34:9)
at Object.loadConfig [as default] (/Users/myproject/node_modules/next/dist/server/config.js:399:74)
at async NextServer.loadConfig (/Users/myproject/node_modules/next/dist/server/next.js:116:22)
at async NextServer.prepare (/Users/myproject/node_modules/next/dist/server/next.js:98:24) {
code: 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING'
}
}
Not sure there is a good solution. A lot of things are going on and I think the solution is to keep it simpler. I just created this issue as other my have experienced, but there were no good results for this error. There is a lot of flux at the moment in the ES Modules system. Typescript also now support native esm modules and Next.js made its own swc rust transpiler.
I am getting a ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING error when using Nextjs 12.0.6
It fails in this file
/node_modules/next/dist/server/config.js
On this line
userConfigModule = await import((0, _url).pathToFileURL(path).href);
Not sure there is a good solution. A lot of things are going on and I think the solution is to keep it simpler. I just created this issue as other my have experienced, but there were no good results for this error. There is a lot of flux at the moment in the ES Modules system. Typescript also now support native esm modules and Next.js made its own swc rust transpiler.