Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node @deno/kv-darwin-x64 error #90

Open
itsthesteve opened this issue Aug 17, 2024 · 0 comments
Open

Node @deno/kv-darwin-x64 error #90

itsthesteve opened this issue Aug 17, 2024 · 0 comments

Comments

@itsthesteve
Copy link

I don't see anyone else with this issue, but I cannot figure this one out.

I ran the install and test scripts from the docs page:

import { openKv } from "@deno/kv";

const kv = await openKv(":memory:");

// use the Deno KV api: https://deno.land/api?s=Deno.Kv&unstable
const key = ["users", crypto.randomUUID()];
const value = { name: "Alice" };
await kv.set(key, value);

const result = await kv.get(key);
console.log(result.value); // { name: "Alice" }

Results in the following error:

 node index.js                                                                                                                                                          1 ↵
node:internal/modules/cjs/loader:444
      const err = new Error(
                  ^

Error: Cannot find module '/Users/steve/Projects/web/_sandbox/deno-kv-node/node_modules/@deno/kv-darwin-x64/deno-kv-napi.darwin-x64.node'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:444:19)
    at Module._findPath (node:internal/modules/cjs/loader:715:18)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/steve/Projects/web/_sandbox/deno-kv-node/node_modules/@deno/kv/esm/_napi_index.cjs:59:29)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/steve/Projects/web/_sandbox/deno-kv-node/node_modules/@deno/kv-darwin-x64/package.json',
  requestPath: '@deno/kv-darwin-x64'
}

Node.js v20.10.0

Even tried manually installing @deno/kv-darwin-x64, but it's pretty empty.

So far I'm the only one from what search results I've found, but I'm stumped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant