Cannot import
Closed this issue · 3 comments
MarianoFacundoArch commented
Code:
import cache from "ts-cache-mongoose";
^^^^^
SyntaxError: The requested module 'ts-cache-mongoose' does not provide an export named 'default'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:131:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:213:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:308:24)
at async loadESM (node:internal/process/esm_loader:42:7)
ilovepixelart commented
Hello @MarianoFacundoArch, I see the issue you want to use ESM, I did basic dual build for ESM CJS but looks like ESM is still lacking, so if you want to use this plugin before I make some changes try to use it in CJS mode by removing:
"type": "module"
from package.json
ilovepixelart commented
ESM suppport will be added in this scope #143
ilovepixelart commented