javascript - C-Lang check failed in React-Hardware/Particle -


i using react, react hardware ([https://github.com/iamdustan/react-hardware/]), , johnny-five particle photon. error stack below comes when run lib/app.js file:

# fatal error in ../deps/v8/src/api.cc, line 1062 # check failed: !value_obj->isjsreceiver() || value_obj->istemplateinfo(). #  ==== c stack trace ===============================      0   node                                0x00000001008c5ecd v8::base::debug::stacktrace::stacktrace() + 19     1   node                                0x00000001008c4be5 v8_fatal + 233     2   node                                0x0000000100146438 v8::template::setaccessorproperty(v8::local<v8::name>, v8::local<v8::functiontem plate>, v8::local<v8::functiontemplate>, v8::propertyattribute, v8::accesscontrol) + 0     3   serialport.node                     0x00000001044ab098 serialportpoller::init(v8::local<v8::object>) + 248     4   serialport.node                     0x00000001044a98ed init + 1201     5   node                                0x00000001007c681a node::dlopen(v8::functioncallbackinfo<v8::value> const&) + 860     6   node                                0x000000010016a808 v8::internal::functioncallbackarguments::call(void (*)(v8::functioncallbackinfo< v8::value> const&)) + 340     7   node                                0x00000001001b1fdf v8::internal::maybehandle<v8::internal::object> v8::internal::(anonymous namespa ce)::handleapicallhelper<false>(v8::internal::isolate*, v8::internal::handle<v8::internal::heapobject>, v8::internal::handle<v8::internal::heap object>, v8::internal::handle<v8::internal::functiontemplateinfo>, v8::internal::handle<v8::internal::object>, v8::internal::builtinarguments) + 915     8   node                                0x00000001001b15b9 v8::internal::builtin_impl_handleapicall(v8::internal::builtinarguments, v8::int ernal::isolate*) + 281     9   ???                                 0x00000a3cdd6043a7 0x0 + 11256528389031     10  ???                                 0x00000a3cdd80a246 0x0 + 11256530510406 [1]    69327 illegal hardware instruction  node lib/app.js 

it's bit puzzling because don't know how hardware supposed work.

here src/app.js:

import react, {component} 'react'; import reacthardware 'react-hardware';  import 5 'johnny-five'; import particle 'particle-io';  class blinkingled extends component {   componentdidmount() {     this.node = new five.led(this.props.port);     this.node.blink(this.props.period);   }    componentwillreceiveprops(nextprops) {     if (this.props.period !== nextprops.period) {       this.node.blink(nextprops.period);     }   }     render() {     return null;   } }  blinkingled.defaultprops = {     port: 13,     period: 500,   };  reacthardware.render(   <blinkingled port={11} period={500} />,   new five.board({         io: new particle({         token: process.env.particle_token,         deviceid: process.env.particle_device_id     })   }),   (inst) => {     console.log('rendered <%s />', blinkingled.name);   } ); 

here package.json below. please note using brunch, babel, , react jsx:

{   "name": "react-particle",   "version": "1.0.0",   "description": "",   "main": "index.js",   "scripts": {     "build": "babel src -d lib"   },   "keywords": [],   "author": "",   "license": "isc",   "dependencies": {     "johnny-five": "^0.10.7",     "particle-io": "^0.14.0",     "react": "15.0.0-rc.1",     "react-hardware": "^0.5.0-alpha.2"   },   "devdependencies": {     "babel-cli": "^6.24.1",     "babel-preset-env": "^1.3.2",     "babel-preset-react": "^6.24.1"   } } 

the culprit react-hardware. able isolate error message occurrence. error occurs when require react-hardware.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -