Open threeeye opened 3 years ago
This happens due to serialport 6.0.4 not working with nodejs 12. Updating serialport to 9.0.7 fixes the problem.
So:
package-lock.json
package.json
and change "serialport": "^6.0.4",
to "serialport": "^9.0.7",
npm install
I'd open a pull request, but this essentially re-creates package-json.lock
and I'm not sure how nodejs based projects handle auditing / vetting changes to dependencies at this scale.
On similar note, npm tells me there are 22 vulnerabilities, out of which 12 are high priority. I suppose these should be looked at?
Thanks for the reply. This fixed that issue. But now I get this on Step 4.1.a:
pi@raspberrypi:/rpos $ npx gulp
{ AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/home/pi/rpos/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/home/pi/rpos/node_modules/undertaker/lib/task.js:13:8)
at Object.<anonymous> (/home/pi/rpos/gulpfile.js:37:6)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '==' }
pi@raspberrypi:~/rpos $
The problem is that the master branch of RPOS was written for Node JS Version 8 and
There is a line in the readme that says "NOTE: Node.js Version 6.x and 8.x have been tested with RPOS. Only a small amount of testing has been done with Node v10."
If you roll back your version of Node JS then you will be OK and Serial Port version 6 will work.
But last weekend I updated the project to use Node v12 which uses the new Serial Port code. Node12 changes also use Gulp Version 4 (as Gulp v3 is not compatible with Node 12) which changed the way Gulp Tasks operate.
So I wonder if you have the wrong version of node, or have not re-run npm install
after pulling in my most recent commits, or maybe I have forgotten to commit a local change.
Hello,
I am facing a similar problem in STEP 3. I am trying to create ONVIF camera using Raspberry Pi Zero W and official camera module v2. After running npm install I get the following error:
pi@still2:~/rpos $ npm install @serialport/bindings@9.1.0 install /home/pi/rpos/node_modules/@serialport/bindings prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild prebuild-install WARN install No prebuilt binaries found (target=11.15.0 runtime=node arch=arm libc= platform=linux) gyp ERR! configure error gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "
", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:299:12) gyp ERR! stack at ChildProcess.emit (events.js:193:13) gyp ERR! stack at maybeClose (internal/child_process.js:999:16) gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:403:11) gyp ERR! stack at Socket.emit (events.js:193:13) gyp ERR! stack at Pipe._handle.close (net.js:614:12) gyp ERR! System Linux 5.10.92+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild " gyp ERR! cwd /home/pi/rpos/node_modules/@serialport/bindings gyp ERR! node -v v11.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"a ny"} (current: {"os":"linux","arch":"arm"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @serialport/bindings@9.1.0 install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @serialport/bindings@9.1.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2022-02-28T11_44_02_523Z-debug.log
Do you have any idea how to solve this problem? Any help is appreciated!
In step 3 I get stuck with the following command:
The output is (long):
I'm attaching the full log 2021-05-03T18_13_46_300Z-debug.log
Thanks