Open Amaranthusss opened 2 years ago
Hello try to install jhonny5 wih yarn and then install seriallport 9.2.8
Lol that worked but only at serialport v9.2.8 as you said.
"etherport-client": "^0.1.4",
"johnny-five": "^2.1.0",
"keypress": "^0.2.1",
"serialport": "9.2.8"
But again there is the same error as above at installation - gyp ERR!
.
I did a test two tests:
johnny-five
as the last one and I got error only once - at yarn add johnny-five
.johnny-five
as first and then the rest of. I got gyp ERR!
at each next added library after johnny-five
. Anyway that has been installed and works. At serialport v10.4.0 (the newest one) does not work.
It looks like serialport didn't install properly.
More information can be found here https://serialport.io/docs/guide-installation
The result of requiring the package is: undefined
Error: Cannot find module '@serialport/bindings'
Require stack:
- C:\Users\Amaranthuss\Desktop\yarn\node_modules\firmata\node_modules\serialport\lib\index.js
- C:\Users\Amaranthuss\Desktop\yarn\node_modules\firmata\lib\com.js
- C:\Users\Amaranthuss\Desktop\yarn\node_modules\firmata\lib\firmata.js
- C:\Users\Amaranthuss\Desktop\yarn\node_modules\johnny-five\lib\board.js
- C:\Users\Amaranthuss\Desktop\yarn\node_modules\johnny-five\lib\accelerometer.js
- C:\Users\Amaranthuss\Desktop\yarn\node_modules\johnny-five\lib\johnny-five.js
- C:\Users\Amaranthuss\Desktop\yarn\index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\Amaranthuss\Desktop\yarn\node_modules\firmata\node_modules\serialport\lib\index.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Amaranthuss\\Desktop\\yarn\\node_modules\\firmata\\node_modules\\serialport\\lib\\index.js',
'C:\\Users\\Amaranthuss\\Desktop\\yarn\\node_modules\\firmata\\lib\\com.js',
'C:\\Users\\Amaranthuss\\Desktop\\yarn\\node_modules\\firmata\\lib\\firmata.js',
'C:\\Users\\Amaranthuss\\Desktop\\yarn\\node_modules\\johnny-five\\lib\\board.js',
'C:\\Users\\Amaranthuss\\Desktop\\yarn\\node_modules\\johnny-five\\lib\\accelerometer.js',
'C:\\Users\\Amaranthuss\\Desktop\\yarn\\node_modules\\johnny-five\\lib\\johnny-five.js',
'C:\\Users\\Amaranthuss\\Desktop\\yarn\\index.js'
]
}
C:\Users\Amaranthuss\Desktop\yarn\node_modules\firmata\lib\com.js:61
throw "Missing serialport dependency";
^
Missing serialport dependency
(Use `node --trace-uncaught ...` to show where the exception was thrown)
That's weird.
I had a similar problem with firmata and serialport when I tried to install my project on a new machine from a github clone. I couldn't figure out the problem, but at some point I realize that the new machine was running the most current version of Node, while the machine I built my project on was running an older version. I downgraded my version of Node to match the old version I built it with and everything installed perfectly.
Hi there, This is work for me on windows:(C++ core environment problem)
Hello there,
It looks like there is a some bug at johnny-five library's dependencies (I am not sure, please verify).
A long time ago I prepared simple NodeJS script to test NodeMcu V3 board and controlling it with the firmata firmware. And that worked but this time I could not install correctly Johnny-Five. So I made a new project with only 3 dependencies for a test:
And when I start the simple script shown below I got error. Script:
Error:
I tried to install firmata but it is not possible.
I saw a like topic but in my case manual installation did not help.
How I did solve the problem: Then I downloaded zip files firmata library (from packages folder) and I copied them to my project
node_modules
(I had to renamefirmata.js
folder tofirmata
). Additionally I had to install serialport because there was a next one error about missing module. But in this case it could be installed bynpm i serialport
.Next, I added manually to dependencies list
but still there is not possible to install them. I got the same error message as above (using node-gyp).
I tested at second PC to isolate my computer software issues. There was a same problem.
Did I do something wrong or that is kind of bug? What can I do to skip copy
firmata
at eachpackage.json
changes? :(Thank you in advance
System: Windows 10