Closed alyen028 closed 4 years ago
I'm also getting this issue.
Uncaught Error: Cannot open /Users/eric/Documents/ITTH/itth/node_modules/talib/build/Release/talib.node: TypeError: Cannot read property 'dlopen' of undefined
at Object.<anonymous> (talib.node:1)
at Object../node_modules/talib/build/Release/talib.node (talib.node:1)
at __webpack_require__ (bootstrap b34e1b5959f12fd9b616:678)
at fn (bootstrap b34e1b5959f12fd9b616:88)
at Object../src/App.js (App.css?9a66:26)
at __webpack_require__ (bootstrap b34e1b5959f12fd9b616:678)
at fn (bootstrap b34e1b5959f12fd9b616:88)
at Object../src/index.js (index.css?f255:26)
at __webpack_require__ (bootstrap b34e1b5959f12fd9b616:678)
at fn (bootstrap b34e1b5959f12fd9b616:88)
at Object.0 (registerServiceWorker.js:108)
at __webpack_require__ (bootstrap b34e1b5959f12fd9b616:678)
at bootstrap b34e1b5959f12fd9b616:724
at bootstrap b34e1b5959f12fd9b616:724
same issue on windows 10
+1 anyone found a solution for this ?
I have the same issue on Mac OS. Does anyone have a solution or a workaround for the problem?
Same issue 🙏
While exploring with Chrome-Extension, I installed RobotJS for desktop automation. At runtime, it is throwing the same error given below,
Uncaught Error: Cannot open C:\Users\Ashutec\Desktop\add-to-crm\node_modules\robotjs\build\Release\robotjs.node: TypeError: Cannot read property 'dlopen' of undefined at Object.<anonymous> (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at Object.<anonymous> (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at n (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at Object.<anonymous> (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at n (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at Object.<anonymous> (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at n (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at Object.<anonymous> (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at n (chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1) at chrome-extension://filhinahhlohnlcejgbfooccoeaofjog/scripts/content.js:1
i am facing the same issue on Mac.
mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: {nodeIntegration: true} }) webPreferences: {nodeIntegration: true} solved my problem
@lyanxing, is this with electron? How do we make these changes to make a distributable build?
You are probably running the code in a browser.
node-loader
only works locally on node
and electron
envs and is not designed to work in a browser.
If the problem is actual, please open a new issue with a minimum reproducible repository.
Other solution is set right target
and __dirname
:
target: 'node',
node: {
__dirname: false,
},
1、 webpackConfig module: { loaders: [ { test: /.js$/, loader: 'babel-loader' }, { test: /.node$/, loader: 'node-loader' } ] }, resolve: { //自动扩展文件后缀名,意味着我们require模块可以省略不写后缀名 extensions: ['.js', '.json', '.node'], } 2、main.js import node from 'hello.node'; or var dddd = require('./hello.node'); all display errors: Uncaught Error: Cannot open F:\web\event\node_modules\hello.node: TypeError: Cannot read property 'dlopen' of undefined
what 's wrong with it ? thank you for your reply !