thingsSDK / thingssdk-cli

Generator for JavaScript microcontroller projects
MIT License
39 stars 9 forks source link

npm run push appears to fail #32

Closed joelkraft closed 7 years ago

joelkraft commented 8 years ago

This was working, now it isn't. Connecting to NodeMCU v2 board with a macbook air, running OSX Yosemite (10.10.5), when I run npm run push, I don't get blinking lights (modified hello world), and I'm getting the following output:

npm i && npm run push
(node:73156) fs: re-evaluating native module sources is not supported..
npm WARN optional Skipping failed optional dependency /noble/bluetooth:
npm WARN notsup Not compatible with your operating system or architect1

> mozilla@0.0.0 push /Users/home/Documents/Code/Projects/thingssda
> node ./scripts/push && npm run repl

Treeshaking code...
Sending code to device - /dev/cu.SLAB_USBtoUART @ 115200 baud...
espruino:  Espruino Command-line Tool 0.0.21
-----------------------------------

espruino:  Connecting to '/dev/cu.SLAB_USBtoUART'
espruino:  No result found - just got ""
espruino:  Connected
espruino:  reset();
espruino:  =u
espruino:   _____                 _
espruino:  |   __|___ ___ ___ _ _|_|___ ___
espruino:  |   __|_ -| . |  _| | | |   | . |
espruino:  |_____|___|  _|_| |___|_|_|_|___|
espruino:            |_| http://espruino.com
espruino:   1v87 Copyright 2016 G.Williams
espruino:
espruino:  Espruino is Open Source. Our work is supported
espruino:  only by sales of official boards and donations:
espruino:  http://espruino.com/Donate
espruino:  Flash map 4MB:512/512, manuf 0xef chip 0x4016
espruino:

> mozilla@0.0.0 repl /Users/home/Documents/Code/Projects/thingssda
> node ./scripts/repl

Connecting REPL...
espruino:  Espruino Command-line Tool 0.0.21
-----------------------------------

espruino:  Connecting to '/dev/cu.SLAB_USBtoUART'
espruino:  No result found - just got ""
espruino:  Connected

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdespruino:  t reset
load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, respruino:  oom 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, espruino:  room 4
tail 8
chksum 0xc0
csum 0xc0

2nd boot version : 1.4(b1)
  SPI Speed      : 80MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000
espruino:
r
 _____                 _
|   __|___ ___ ___ _ _|_|___ ___
|   __|_ -| . |  _| | | |   | . |
|_____|___|  _|_| |___|_espruino:  |_|_|___|
          |_| http://esespruino:  pruino.com
 1v87 Copyright 2016 G.espruino:  Williams

Espruino is Open Source. Our work is supported
only by sales of official boards and donations:
http://espruino.com/Donate
Flash map 4MB:512/512, manuf 0xef chespruino:  ip 0x4016

>
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt resespruino:  et
load 0x40100000, len 1396, roespruino:  om 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0

2nd boot version espruino:  : 1.4(b1)
  SPI Speed      : 80MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1espruino:  000

{
 _____                 _
|   __|___ ___ ___ _ _|_|___ ___
|   __|_ -| . |  _| | | |   | . |
|_____|___|  _|_| |___|_|_|_|___|
          |_| http://espruino.com
 1v87 Copyright 2016 G.Williams

Espruino is Open Source. Our work is supported
only by sales of official boards and donations:
http://espruino.com/Donate
Flash map 4MB:512/512, manuf 0xef chip 0x4016

>
Press Ctrl-C again to exit
>espruino:
craigsdennis commented 8 years ago

Make sure devices.json is set to 115200 not 9600.

handeyeco commented 8 years ago

I know I already talked about it in Slack, but I'm having a similar issue:

> hello_world@0.0.0 push /Users/matthew/Desktop/Code_Things/IoT/hello_world
> node ./scripts/push && npm run repl

Treeshaking code...
Sending code to device - /dev/cu.SLAB_USBtoUART @ 115200 baud...
espruino:  Espruino Command-line Tool 0.0.21
-----------------------------------

espruino:  Connecting to '/dev/cu.SLAB_USBtoUART'
espruino:  No result found - just got ""
espruino:  Connected

> hello_world@0.0.0 repl /Users/matthew/Desktop/Code_Things/IoT/hello_world
> node ./scripts/repl

Connecting REPL...
espruino:  Espruino Command-line Tool 0.0.21
-----------------------------------

espruino:  Connecting to '/dev/cu.SLAB_USBtoUART'
espruino:  No result found - just got ""
espruino:  Connected

Then is just hangs until I Ctrl+C out. I've tried both baud rates, flashing and reflashing the ESP8266, creating new projects with thingssdk new something, deleting and reinstalling node_modules, etc. Board seems to get power and LED on board blinks when it's booted, but it's not running the program.

Mac OSX Sierra with Node 6.8 (although I've tried 4.6 and it fails because of ES6).

Edit: thingssdk version 1.0.0

chalkers commented 7 years ago

@joelkraft and @matthewbryancurtis You still having issues?

handeyeco commented 7 years ago

@chalkers, I am not.

joelkraft commented 7 years ago

Yes @chalkers. :(

@craigsdennis my devices.json is set to 115200.

I tried npm update as well, didn't work.

Here is the latest (appears to be a loop):

> mozilla@0.0.0 push /Users/joelkraft/Documents/Code/Projects/thingssdk/mozilla
> node ./scripts/push && npm run repl

Treeshaking code...
Sending code to device - /dev/cu.SLAB_USBtoUART @ 115200 baud...
espruino:  Espruino Command-line Tool 0.0.21
-----------------------------------

espruino:  Connecting to '/dev/cu.SLAB_USBtoUART'
espruino:  No result found - just got ""
espruino:  Connected

> mozilla@0.0.0 repl /Users/joelkraft/Documents/Code/Projects/thingssdk/mozilla
> node ./scripts/repl

Connecting REPL...
espruino:  Espruino Command-line Tool 0.0.21
-----------------------------------

espruino:  Connecting to '/dev/cu.SLAB_USBtoUART'
espruino:  No result found - just got ""
espruino:  Connected
chalkers commented 7 years ago

Hmmm @joelkraft looks like you're still using older stuff. We'll have to figure out how to nix it.

joelkraft commented 7 years ago

I generated a new project after reinstalling thingssdk-cli, and copied in my other main.js file and it worked! Case closed.