Freemaster lite, Node-red Serialport -> bindings.node is not valid win32 application

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Freemaster lite, Node-red Serialport -> bindings.node is not valid win32 application

2,066件の閲覧回数
PavolStrbak
NXP Employee
NXP Employee

Hello, I would like ask.

I installed FreeMaster lite, and I would like to use node-red-node-serialport extension to the Node-Red. 

But I get an issue: bindings.node is not valid win32 application. 

I tried to recompile it, but even the recompile was success I still obtain this error. 

I tried all this 

Could someone help me? 

 

Thank you 

Pavol 

 

0 件の賞賛
4 返答(返信)

2,035件の閲覧回数
PavolStrbak
NXP Employee
NXP Employee

Hello @iulian_stan 

Thank you for quick response. 

Unfortunately I tried to reinstall NodeJS to 32bit (you right, I had 64bit)  but other issue occurred:

21 Jan 17:08:12 - [warn] [node-red-node-serialport/serialport] Error: The module '\\?\C:\Users\nxf68958\.node-red\node_modules\@serialport\bindings\build\Release\bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

 

I tried to rebuild it again, Also used StackoverFlow which I found, use NodeJS with 16.8.0 32Bit installation, rebuild packages by electron and reinstall everything, But nothing helped.  

The NVM is not sufficient for me.

So, I will try to install Node-Red separately and use the inode-red-contrib-freemaster.

Thank you very much

Pavol

 

 

0 件の賞賛

2,030件の閲覧回数
iulian_stan
NXP Employee
NXP Employee

Hi @PavolStrbak,

First I'd like to fix one of my previous statements 

you don't need to match the exact version of NodeJS because the .node files ABI is consistent across NodeJS versions

This applies to minor, and patch versions. The major version should still match. You can find NodeJS versions and their corresponding ABI (NODE_MODULE_VERSION) here.

Next, according to your logs, there's still a 'node-red-node-serialport' package built with NodeJS 10 in your Node-RED home directory. As long as there's already a built version of the package installing it (even with a different NodeJS version) won't have any effect - just checked it on my side. I reproduced your error and had to reinstall 'node-red-node-serialport' (uninstall and install again) to fix the issue.

One more comment here - after uninstalling old package using npm, Pallett Manager from Node-RED can also install it correctly.

Regards,
Iulian 

0 件の賞賛

2,024件の閲覧回数
PavolStrbak
NXP Employee
NXP Employee

Hi @iulian_stan 

Thank you very much, 

unfortunately don't. I reinstall everything. 

Uninstall FreeMaster, npm, nodejs, and everything which I found connected by node-red. Also from users/.../appdata...

then download exactly the same version of nodejs as you said that the FreeMaster is using, reinstall FreeMaster and all packages, used new clear workspace, and still have the same error.

But in case you was able to reproduce my issue, and also fix this problem, I will try to do it again. Maybe some configuration remained hidden from me.

it follows that the problem is on my side. And that's important.

 

So. Thank You very much @iulian_stan for help.

0 件の賞賛

2,056件の閲覧回数
iulian_stan
NXP Employee
NXP Employee

Hi @PavolStrbak,

Your issue is most likely caused by inconsistent version between NodeJS versions used on one side by your system and on another side - by FreeMASTER Lite.

Cause:
When you install serial library, in both cases via Node-RED Pallet Manager or NPM it uses your system NodeJS distribution. I suspect that it is most likely a 64bit version. FreeMASTER Lite is a 32bit application (we kept it as 32bit binary for consistency with main FreeMASTER GUI Tool).

Solution:

  1. One option would be to install a 32bit version of NodeJS (FreeMASTER Lite uses internally NodeJS 16.8.0 32bit). According to NodeJS documentation you don't need to match the exact version of NodeJS because the .node files ABI is consistent across NodeJS versions.
    I could suggest using NVM to rapidly switch between NodeJS versions in case you need the 64bit one in your other projects.
  2. The second options is to use your system NodeJS as main one for your work. In this case you would need to install separately Node-RED and inode-red-contrib-freemaster (it comes with FreeMASTER installation), and use FreeMASTER Lite as a simple JSON-RPC server (Node-RED is no longer needed so it ca be disabled when you start the tool '--no-node_red').

Let me know if either of these options fixes your issue,
Iulian

0 件の賞賛