Giter Club home page Giter Club logo

Comments (3)

georgelemon avatar georgelemon commented on May 29, 2024

Maybe you need Webpack node-loader? Or something similar but for Babel

from denim.

jfilby avatar jfilby commented on May 29, 2024

I'm using an npm called nextjs-node-loader, which gets further, but the module doesn't load because I don't have glibc_2.34.

The requirement for glibc_2.34 seems to come from the compiled addon.

I've retested and I get the same error in the package directory where I use Denim. I'm not sure if this is from a snap that auto-updated itself and broke something. I'll investigate some more. It worked a day or two ago.

Loading with Bun is also suddenly broken, with an undefined symbol: cmdLine error.

I've now updated to Node v20 and I get the same error that Bun gives, but with a little bit more context before that:

node:internal/modules/cjs/loader:1343
  return process.dlopen(module, path.toNamespacedPath(filename));

Error: /full-path/...my-module.node: undefined symbol: cmdLine

I commented out everything and slow uncommented various lines in my Nim package. It turns out that importing jester causes this problem. I use it in some shared code. It's possible to not use it, but it will take me a bit of time to separate the code. I'll continue on this tomorrow.

from denim.

jfilby avatar jfilby commented on May 29, 2024

I got it working by:

  1. Using nextjs-node-loader for the Next.js I'm using the addon in. Node-loader tried to find the addon as a shared library in a path and filename that didn't exist. Node-bindings had a bug that gave an indexOf undefined error.
  2. Using Node v20. I had a glibc_2.34 not found error with v18, I'm not sure if that would've been eliminated with the next step.
  3. Removing any imports of the jester package from my addon. I was importing code from my Nexus package that did this to check headers and submitted form fields.
  4. I import the functions from the addon using a relative path. I had to add an @ts-ignore annotation above the import to silence a VSCode warning that the import couldn't be found.

from denim.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.