Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
TypeError: no se pueden leer las propiedades de undefined (leyendo 'publicar') en RaspiCam. <anónimo> (/home/pi/wia-pi-camera/run-camera.js:26:13)

He estado tratando de corregir este error durante dos días, parece que sucede en: wia.event.publish. La foto se tomó con éxito, pero la publicación de un evento parece ser un problema.

 'use strict'; const Wia = require('wia'); var wia = new Wia('my-device-secret-key'); var fs = require('fs'); var RaspiCam = require("raspicam"); // Setup the camera var camera = new RaspiCam({ mode: 'photo', output: __dirname + '/photo.jpg', encoding: 'jpg' }); // Listen for the "start" event triggered when the start method has been successfully initiated camera.on("start", function(){ console.log("Starting to take photo."); }); // Listen for the "read" event triggered when each new photo/video is saved camera.on("read", function(err, timestamp, filename){ console.log("New photo created.", timestamp, filename); // Publish the photo to Wia wia.event.publish({ name: 'photo', file: fs.createReadStream(__dirname + '/' + filename) }); }); // Take a photo camera.start();
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!