Error installing "node-red-node-arduino 0.3.1"

i have try to install

C:\Windows\system32>npm install node-red-node-arduino
npm WARN deprecated bcrypt@3.0.6: versions < v5.0.0 do not handle NUL in passwords properly
npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properly
npm WARN deprecated node-pre-gyp@0.12.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path C:\Windows\system32\node_modules\firmata\node_modules@serialport\bindings
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@14.16.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.2 found at "C:\Python39\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1440) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python39\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Windows\system32\node_modules\firmata\node_modules\@serialport\bindings\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\tejas\\AppData\\Local\\node-gyp\\Cache\\14.16.0\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Windows\system32\node_modules\firmata\node_modules\@serialport\bindings',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\Windows\system32\node_modules\firmata\node_modules\@serialport\bindings\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0\common.gypi not found (cwd: C:\Windows\system32\node_modules\firmata\node_modules@serialport\bindings) while reading includes of binding.gyp while trying to load binding.gypnpm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "E:\nodejs_nodered\node.exe" "C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Windows\system32\node_modules\firmata\node_modules@serialport\bindings
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\tejas\AppData\Local\npm-cache_logs\2021-03-24T22_06_32_074Z-debug.log

The first problem is that you are not in the correct directory to install it. You should be in your .node-red directory. Whether there are other problems I don't know.

Did you try to install it using Manage Palette in node-red? Usually that is the best way.

Thank you for your response...!!

Yes, for the first time i try to install from the Manage Palette in node-red web browser only. But, error like

happen.

View Log:
2021-03-25T11:39:50.334Z Install : node-red-node-arduino 0.3.1

2021-03-25T11:39:50.660Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-arduino@0.3.1
2021-03-25T11:40:08.891Z [err] npm ERR!
2021-03-25T11:40:08.891Z [err] code 1
2021-03-25T11:40:08.891Z [err] npm ERR! path C:\Users\tejas.node-red\node_modules\firmata\node_modules@serialport\bindings
2021-03-25T11:40:08.893Z [err] npm ERR! command failed
2021-03-25T11:40:08.893Z [err] npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info it worked if it ends with ok
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info using node-gyp@7.1.2
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp info using node@14.16.0 | win32 | x64
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp info find Python using Python version 3.9.2 found at "C:\Python39\python.exe"
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info find VS using VS2017 (15.9.28307.1440) found at:
2021-03-25T11:40:08.893Z [err] npm ERR!
2021-03-25T11:40:08.893Z [err] gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info find VS run with --verbose for detailed information
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn C:\Python39\python.exe
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args [
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp info spawn args 'binding.gyp',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '-f',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args 'msvs',
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp info spawn args '-I',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args 'C:\Users\tejas\.node-red\node_modules\firmata\node_modules\@serialport\bindings\build\config.gypi',
2021-03-25T11:40:08.893Z [err] npm ERR!
2021-03-25T11:40:08.893Z [err] gyp info spawn args '-I',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '-I',
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp info spawn args 'C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0\common.gypi',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '-Dlibrary=shared_library',
2021-03-25T11:40:08.893Z [err] npm ERR!
2021-03-25T11:40:08.893Z [err] gyp info spawn args '-Dvisibility=default',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0',
2021-03-25T11:40:08.893Z [err] npm ERR!
2021-03-25T11:40:08.893Z [err] gyp info spawn args '-Dnode_gyp_dir=C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\tejas\\AppData\\Local\\node-gyp\\Cache\\14.16.0\\<(target_arch)\\node.lib',
2021-03-25T11:40:08.893Z [err] npm ERR!
2021-03-25T11:40:08.893Z [err] gyp info spawn args '-Dmodule_root_dir=C:\Users\tejas\.node-red\node_modules\firmata\node_modules\@serialport\bindings',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '-Dnode_engine=v8',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '--depth=.',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '--no-parallel',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '--generator-output',
2021-03-25T11:40:08.893Z [err] npm ERR!
2021-03-25T11:40:08.893Z [err] gyp info spawn args 'C:\Users\tejas\.node-red\node_modules\firmata\node_modules\@serialport\bindings\build',
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args '-Goutput_dir=.'
2021-03-25T11:40:08.893Z [err] npm ERR! gyp info spawn args ]
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp: C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0\common.gypi not found (cwd: C:\Users\tejas.node-red\node_modules\firmata\node_modules@serialport\bindings) while reading includes of binding.gyp while trying to load binding.gyp
2021-03-25T11:40:08.893Z [err] npm ERR! gyp ERR! configure error
2021-03-25T11:40:08.893Z [err] npm ERR!
2021-03-25T11:40:08.893Z [err] gyp ERR! stack Error: gyp failed with exit code: 1
2021-03-25T11:40:08.893Z [err] npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
2021-03-25T11:40:08.893Z [err] npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.893Z [err] ERR! gyp ERR! System Windows_NT 10.0.19042
2021-03-25T11:40:08.893Z [err] npm ERR! gyp ERR! command "E:\nodejs_nodered\node.exe" "C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
2021-03-25T11:40:08.893Z [err] npm
2021-03-25T11:40:08.894Z [err] ERR! gyp ERR! cwd C:\Users\tejas.node-red\node_modules\firmata\node_modules@serialport\bindings
2021-03-25T11:40:08.894Z [err] npm ERR! gyp ERR! node -v v14.16.0
2021-03-25T11:40:08.894Z [err] npm ERR! gyp ERR! node-gyp -v v7.1.2
2021-03-25T11:40:08.894Z [err] npm ERR! gyp ERR! not ok
2021-03-25T11:40:08.954Z [err]
2021-03-25T11:40:08.954Z [err] npm
2021-03-25T11:40:08.954Z [err] ERR! A complete log of this run can be found in:
2021-03-25T11:40:08.954Z [err] npm ERR! C:\Users\tejas\AppData\Local\npm-cache_logs\2021-03-25T11_40_08_894Z-debug.log
2021-03-25T11:40:08.968Z rc=1

Then after i try to install from cmd :

C:\Users\tejas>cd .node-red

C:\Users\tejas.node-red>npm install node-red-node-arduino
npm ERR! code 1
npm ERR! path C:\Users\tejas.node-red\node_modules\firmata\node_modules@serialport\bindings
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@14.16.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.2 found at "C:\Python39\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1440) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python39\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\tejas\.node-red\node_modules\firmata\node_modules\@serialport\bindings\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\tejas\\AppData\\Local\\node-gyp\\Cache\\14.16.0\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\tejas\.node-red\node_modules\firmata\node_modules\@serialport\bindings',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\Users\tejas\.node-red\node_modules\firmata\node_modules\@serialport\bindings\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: C:\Users\tejas\AppData\Local\node-gyp\Cache\14.16.0\common.gypi not found (cwd: C:\Users\tejas.node-red\node_modules\firmata\node_modules@serialport\bindings) while reading includes of binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "E:\nodejs_nodered\node.exe" "C:\Users\tejas\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\tejas.node-red\node_modules\firmata\node_modules@serialport\bindings
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\tejas\AppData\Local\npm-cache_logs\2021-03-25T11_42_49_853Z-debug.log

I think this is probably the key line in the log

Unfortunately I have no idea what to do about it. Google yields some suggestions but I don't see one that looks particularly relevant to your problem. I see @dceejay is one of the maintainers of the node so perhaps he will be able to help.

I notice that you are also using npm 7 and node 14. Generally for anything that has a binary build in it we prefer to be cautious and recommend nodejs 12 and npm 6.
In fact looking at the firmata library we rely on it uses serialport version8 which only goes up to node12 - so yes - the answer is you need to drop back to node12.

Thank you so much for your reply.....!!!

It worked... I installed nodejs (12.19.1) & npm (6.14.8) by using nvm.

Thank You....!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.