-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: NJS-045: cannot load a node-oracledb binary for Node.js 12.4.0 (darwin x64) #1253
Comments
What's the OS version? |
This error appears on both macOS 10.14.6 and windows 10 x64 1909 |
Last time I tried electron, I think I used https://github.com/n-riesco/oracledb-electron-builder To use webpack you need to patch the lib/oracledb.js file, or build the current master branch. See #1156 (comment) But I don't see webpack in your example? Neither Electron or Webpack will package Instant Client, so you will need to install that separately. |
ok, I'll try oracledb-electron-builder. my project was created by vue-cli, webpack can be configured by vue.config.js
const CopyWebpackPlugin = require('copy-webpack-plugin')
const path = require("path")
function resolve (dir) {
return path.join(__dirname, dir);
}
module.exports = {
publicPath: "./",
devServer: {
// can be overwritten by process.env.HOST
host: "0.0.0.0",
port: 8080
},
configureWebpack: config => {
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: resolve('node_modules/oracledb/build'),
to: 'node_modules/oracledb/build'
}
]
})
)
},
chainWebpack: config => {
config.resolve.alias
.set("@", resolve("src"))
.set("src", resolve("src"))
.set("common", resolve("src/common"))
.set("components", resolve("src/components"));
}
}; |
Try node-oracledb 5. See #1156 (comment) Also check out the new macOS installation doc and new initialization doc. |
This is my repo:
https://github.com/fgprodigal/oracledb-test
It is initialed by vue-cli and vue add electron, I added require("oracledb") in background.js, when i run 'yarn run electron:serve', the error mentioned above appears.
I've read some earlier issues, I added copy-webpack-plugin but still not work, so please help me, what is going wrong with electron or webpack?
The text was updated successfully, but these errors were encountered: