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

Error importing library in server side of web app #62

Open
puntogris opened this issue Dec 17, 2023 · 0 comments
Open

Error importing library in server side of web app #62

puntogris opened this issue Dec 17, 2023 · 0 comments

Comments

@puntogris
Copy link

hello! i have a sveltkit app and inside a load function(server side) im getting this import error, am I missing something?

import storj from "uplink-nodejs"

export const load = async () => {
  const link = new storj.Uplink()
  const access = link.parseAccess(TOKEN_ACCESS)
  // ....
};

i installed this packages:

 "node-gyp": "^10.0.1",
 "uplink-nodejs": "^1.2.6"

this is the error im getting

4:55:55 PM [vite] Error when evaluating SSR module /src/routes/+page.server.ts: failed to import "uplink-nodejs"
|- Error: Could not locate the bindings file. Tried:
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/build/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/build/Debug/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/build/Release/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/out/Debug/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/Debug/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/out/Release/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/Release/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/build/default/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/compiled/21.1.0/darwin/arm64/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/addon-build/release/install-root/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/addon-build/debug/install-root/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/addon-build/default/install-root/uplink.node
 → /Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/lib/binding/node-v120-darwin-arm64/uplink.node
    at bindings (/Users/joaquin/Documents/Proyectos/test/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/dist/access.js:6:16)
    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)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/joaquin/Documents/Proyectos/test/node_modules/uplink-nodejs/dist/uplink.js:5:21)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
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