Comments (3)
Maybe you need Webpack node-loader? Or something similar but for Babel
from denim.
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.
I got it working by:
- 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.
- 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.
- 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.
- 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)
- Build binding.gyp given a package name HOT 3
- node-gyp put node_api.h in an unexpected place
- denim -h doesn't do anything HOT 2
- Macros for cleaner export Nim code HOT 2
- Compiled binary segfaults when run HOT 6
- Code breaks with latest head HOT 9
- Frequent: SIGSEGV: Illegal storage access. (Attempt to read from nil?) HOT 2
- Nim exceptions break the node process HOT 3
- Calling callback JS functions in Nim HOT 3
- `export_napi` not works with variables since Nim 2.0 HOT 1
- Build for Windows? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from denim.