microsoft / pxt-ev3

Microsoft MakeCode editor for the LEGO MINDSTORMS EV3 Brick
https://makecode.mindstorms.com/
Other
55 stars 39 forks source link

Unable to run `pxt serve --cloud` #916

Closed kldavis4 closed 5 years ago

kldavis4 commented 5 years ago

Describe the bug

pxt-ev3|master⚡ ⇒ pxt serve --cloud
Using target ev3 with build engine dockermake
  target: v /Users/kelly/projects/thirdparty/pxt-ev3
  pxt-core: v /Users/kelly/projects/thirdparty/pxt
building node_modules/pxt-core...
[run] cd node_modules/pxt-core; npm run build

> pxt-core@5.23.15 build /Users/kelly/projects/thirdparty/pxt
> jake

cp -r libs/pxt-common/pxt-core.d.ts docs/static/playground/pxt-common/pxt-core.d.js
cp -r libs/pxt-common/pxt-helpers.ts docs/static/playground/pxt-common/pxt-helpers.js
local pxt-core built.
building /Users/kelly/projects/thirdparty/pxt-ev3/node_modules/pxt-common-packages/sim...
[run] cd /Users/kelly/projects/thirdparty/pxt-ev3/node_modules/pxt-common-packages/sim; node ../node_modules/typescript/bin/tsc
log strings: 78 files; 2 strings -> sim-strings.json
copying common-sim...
error TS6053: File '/Users/kelly/projects/thirdparty/pxt/built/lib.dom.d.ts' not found.
error TS6053: File '/Users/kelly/projects/thirdparty/pxt/built/lib.dom.iterable.d.ts' not found.
error TS6053: File '/Users/kelly/projects/thirdparty/pxt/built/lib.es2015.d.ts' not found.
error TS6053: File '/Users/kelly/projects/thirdparty/pxt/built/lib.scripthost.d.ts' not found.
error TS2318: Cannot find global type 'Array'.
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'Function'.
error TS2318: Cannot find global type 'IArguments'.
error TS2318: Cannot find global type 'Number'.
error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.
building target.json in /Users/kelly/projects/thirdparty/pxt-ev3...
building /Users/kelly/projects/thirdparty/pxt-ev3/libs/base
control.ts(93,9): error TS2304: Cannot find name 'dmesg'.

control.ts(104,36): error TS2339: Property 'allocateNotifyEvent' does not exist on type 'typeof control'.

control.ts(116,38): error TS2304: Cannot find name 'DAL'.

control.ts(137,21): error TS2339: Property 'raiseEvent' does not exist on type 'typeof control'.

control.ts(137,32): error TS2304: Cannot find name 'DAL'.

control.ts(151,40): error TS2339: Property 'allocateNotifyEvent' does not exist on type 'typeof control'.

control.ts(153,25): error TS2339: Property 'raiseEvent' does not exist on type 'typeof control'.

control.ts(153,36): error TS2304: Cannot find name 'DAL'.

control.ts(183,29): error TS2339: Property 'raiseEvent' does not exist on type 'typeof control'.

control.ts(198,21): error TS2339: Property 'allocateNotifyEvent' does not exist on type 'typeof control'.

control.ts(310,31): error TS2304: Cannot find name 'DAL'.

eventcontext.ts(94,29): error TS2339: Property 'dmesg' does not exist on type 'typeof control'.

json.ts(317,21): error TS2339: Property 'dmesg' does not exist on type 'typeof control'.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/core
output.ts(905,5): error TS2375: Duplicate number index signature.

pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/music
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/color-sensor
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/touch-sensor
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/ultrasonic-sensor
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/infrared-sensor
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/gyro-sensor
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/screen
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/ev3
console.ts(21,33): error TS2345: Argument of type '(msg: string) => void' is not assignable to parameter of type '(priority: ConsolePriority, text: string) => void'.
  Types of parameters 'msg' and 'priority' are incompatible.
    Type 'ConsolePriority' is not assignable to type 'string'.

pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

startup.ts(2,21): error TS2345: Argument of type '(msg: string) => void' is not assignable to parameter of type '(priority: ConsolePriority, text: string) => void'.
  Types of parameters 'msg' and 'priority' are incompatible.
    Type 'ConsolePriority' is not assignable to type 'string'.

building /Users/kelly/projects/thirdparty/pxt-ev3/libs/storage
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

building libs/base
building libs/core
building libs/music
building libs/color-sensor
building libs/touch-sensor
building libs/ultrasonic-sensor
building libs/infrared-sensor
building libs/gyro-sensor
building libs/screen
building libs/ev3
building libs/storage
building libs/blocksprj
polling C++ build https://makecode.com/compile/eb5a3b32bf316791302a2c287b0f8b927837e323f1ab9d362b6aff530dc619de.json
build log https://makecode.com/compile/eb5a3b32bf316791302a2c287b0f8b927837e323f1ab9d362b6aff530dc619de.log
build failed
In file included from pxtapp/base/pxt.cpp:1:0:
pxtapp/pxtbase.h: In member function 'uintptr_t pxt::BoxedString::runMethod(int)':
pxtapp/pxtbase.h:803:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         return ((uintptr_t(*)(BoxedString *))((VTable *)this->vtable)->methods[idx])(this);
                                                               ^
pxtapp/pxtbase.h: In member function 'const char* pxt::BoxedString::getUTF8DataAt(uint32_t)':
pxtapp/pxtbase.h:811:73: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             ((const char *(*)(BoxedString *, uint32_t))((VTable *)this->vtable)->methods[7]);
                                                                         ^
pxtapp/pxtbase.h: In function 'void* pxt::gcAllocate(int)':
pxtapp/pxtbase.h:1071:28: error: 'xmalloc' was not declared in this scope
     return xmalloc(numbytes);
                            ^
pxtapp/base/pxt.cpp: In member function 'void pxt::RefObject::destroyVT()':
pxtapp/base/pxt.cpp:88:14: error: 'free' was not declared in this scope
     free(this);
              ^
pxtapp/base/pxt.cpp: In member function 'void pxt::LLSegment::setLength(unsigned int)':
pxtapp/base/pxt.cpp:164:66: error: 'xmalloc' was not declared in this scope
         TValue *tmp = (TValue *)(xmalloc(newSize * sizeof(TValue)));
                                                                  ^
pxtapp/base/pxt.cpp:174:19: error: 'xfree' was not declared in this scope
         xfree(data);
                   ^
pxtapp/base/pxt.cpp: In member function 'void pxt::LLSegment::destroy()':
pxtapp/base/pxt.cpp:205:15: error: 'xfree' was not declared in this scope
     xfree(data);
               ^
pxtapp/base/pxt.cpp: In function 'pxt::RefCollection* pxtrt::keysOf(pxt::TValue)':
pxtapp/base/pxt.cpp:546:20: error: 'registerGCObj' was not declared in this scope
     registerGCObj(r);
                    ^
pxtapp/base/pxt.cpp:552:22: error: 'unregisterGCObj' was not declared in this scope
     unregisterGCObj(r);
                      ^
In file included from pxtapp/base/pxt.cpp:1:0:
pxtapp/pxtbase.h: In function 'void* pxt::gcAllocate(int)':
pxtapp/pxtbase.h:1072:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [bld/pxtapp/base/pxt.o] Error 1
OK
arm-linux-gnueabi-gcc -W -Wall -Wno-unused-parameter -Ipxtapp -fwrapv -fno-threadsafe-statics -Os -mthumb  -std=c++11 -fno-rtti -fno-exceptions -fno-unwind-tables -c pxtapp/base/pxt.cpp -o bld/pxtapp/base/pxt.o
Makefile:33: recipe for target 'bld/pxtapp/base/pxt.o' failed

TypeError: Cannot read property 'length' of null
    at compressHex (/Users/kelly/projects/thirdparty/pxt/built/pxt.js:102944:37)
    at /Users/kelly/projects/thirdparty/pxt/built/pxt.js:102881:36
    at tryCatcher (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
{ sha: 'eb5a3b32bf316791302a2c287b0f8b927837e323f1ab9d362b6aff530dc619de' }
pxt_modules/base/control.ts(310,35): error TS2339: Property 'CFG_RAM_BYTES' does not exist on type 'typeof DAL'.

pxt_modules/core/output.ts(905,5): error TS2375: Duplicate number index signature.

pxt_modules/ev3/console.ts(21,33): error TS2345: Argument of type '(msg: string) => void' is not assignable to parameter of type '(priority: ConsolePriority, text: string) => void'.
  Types of parameters 'msg' and 'priority' are incompatible.
    Type 'ConsolePriority' is not assignable to type 'string'.

pxt_modules/ev3/startup.ts(2,21): error TS2345: Argument of type '(msg: string) => void' is not assignable to parameter of type '(priority: ConsolePriority, text: string) => void'.
  Types of parameters 'msg' and 'priority' are incompatible.
    Type 'ConsolePriority' is not assignable to type 'string'.

pxt_modules/base/pxt-core.d.ts(1,1): error TS9043: The hex file is not available, please connect to internet and try again.

***
*** Build failed: target build failed: Compiler test failed
Error: Compiler test failed
    at Object.userError (/Users/kelly/projects/thirdparty/pxt/built/pxt.js:98159:25)
    at /Users/kelly/projects/thirdparty/pxt/built/pxt.js:149834:19
    at tryCatcher (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/kelly/projects/thirdparty/pxt/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
***

Starting server in /Users/kelly/projects/thirdparty/pxt-ev3
With pxt core at /Users/kelly/projects/thirdparty/pxt
starting local ws server at 3233...
---------------------------------------------

To launch the editor, open this URL:
http://localhost:3232/#local_token=3ab059be-a6ff-4f05-a43f-2a5d15cf93fd&wsport=3233

---------------------------------------------
opening http://localhost:3232/#local_token=3ab059be-a6ff-4f05-a43f-2a5d15cf93fd&wsport=3233

In the Chrome console I am seeing this error and an unresponsive splash screen:

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at patchAppTarget (pxtapp.js:2011)
    at Object.setAppTarget (pxtapp.js:1906)
    at Object.setupAppTarget (main.js:18477)
    at HTMLDocument.<anonymous> (main.js:3733)

To Reproduce Follow repo README.md instructions. This is occurring on node 8.11.1

Expected behavior IDE should load

Screenshots

Screen Shot 2019-09-22 at 7 09 59 PM

Desktop (please complete the following information):

Additional context I have local master versions of pxt, pxt-ev3 and pxt-common-packages installed

pelikhan commented 5 years ago

We just upgraded to pxt v5, please try again.