rin5mo ago

Problem with the npm package and vite/esbuild

https://github.com/denoland/denokv/issues/64 Is there a solution to this problem? Has anyone been able to build denokv with node, vite?
Problem with the npm package and vite/esbuild · Issue #64 · denolan...
I can't get @deno/kv to work with vite nor esbuild. With vite/rollup I get: [commonjs--resolver] Unexpected character '' (Note that you need plugins to import files that are not JavaScr...
1 Reply
Deno AI Helper
Deno AI Helper5mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, I can provide some general advice based on the information you've provided. Since DenoKV is a Deno-specific module, it's designed to work with Deno and not with Node.js or tools that are specific to the Node.js ecosystem like npm, Vite, or esbuild. If you're trying to use DenoKV within a Node.js context, you might encounter compatibility issues because Deno and Node.js have different module systems and global APIs. If you're looking to use DenoKV in a project that's built with Vite or esbuild, you would typically need to ensure that the module is compatible with these tools, which might not be the case here. DenoKV is likely intended to be used with Deno's native tooling and module resolution. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. If you're looking for a solution to use DenoKV with Node.js, Vite, or esbuild, you might need to look for a Node.js equivalent or consider running Deno and Node.js side by side, each handling the parts they are designed for.