ushu / node-addon-loader Goto Github PK
View Code? Open in Web Editor NEWA loader for node native addons
Home Page: https://github.com/ushu/node-addon-loader
License: MIT License
A loader for node native addons
Home Page: https://github.com/ushu/node-addon-loader
License: MIT License
Noticed that the latest version on NPM is 0.0.3, looks like you forgot to do an npm publish.
I specifically need the new rewritePath
option
I think you should add the module loaderUtils
as a dependence
I'm currently using node-addon-loader
to attempt to pull in a C++ node addon into our electron application decrediton. It is currently working while using a hot-loaded dev environment and when running the windows-unpacked version. But after installing the electron-builder windows NSI and running the install .exe it no longer is able to locate the required .node
webpack config:
https://github.com/alexlyp/decrediton/blob/ayp_anotherTry/webpack.config.base.js#L35-L41
require(win32ipc):
https://github.com/alexlyp/decrediton/blob/ayp_anotherTry/app/main.development.js#L306
Any thoughts as to why it isn't working after installing verses windows-unpacked? Any help would be greatly appreciated! Cheers
Module build failed (from ./node_modules/node-addon-loader/index.js):
TypeError: Cannot read property 'nodeAddonLoader' of undefined
Hi, attempted plugin on latest webpack 4.12.0.
Config:
module: {
rules: [
{
test: /\.node$/,
use: {
loader: "node-addon-loader",
options: {}
}
}
]
}
Failing with
Module build failed (from ./node_modules/node-addon-loader/index.js):
TypeError: Cannot read property 'nodeAddonLoader' of undefined
at Object.module.exports (node_modules/node-addon-loader/index.js:16:29)
Sounds like some breaking changes in newest webpack?
I'm posting this here as I'm not sure if this is an issue with the boilerplate I'm using or this addon or just me being bad, but hoping someone can help me figure it out.
I'm using this boilerplate: https://github.com/chentsulin/electron-react-boilerplate
I have added node-addon-loader and have tried many different configurations but currently have this rule in my webpack config:
test: /\.node$/,
use: {
loader: 'node-addon-loader',
options: {
basePath: './',
rewritePath: './'
}
}
}```
When I run the packaged app, I get the following:
.../MyApp.app/Contents/Resources/app.asar/main.prod.js:7530: Uncaught Error: Cannot open .node: Error: dlopen(.node, 1): image not found
When I extract the app.asar file, I can see the <hex>.node file in the root of app.asar along side main.prod.js, so I'm a little confused as to why the app can't find the addon.
In the Readme, the option should be 'path.resolve' instead of just resolve(__dirname....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.