Hey, I am trying to run a local version of makecode as described in the tutorial (https://github.com/microsoft/pxt-maker).
I cloned the three mentioned gits, ran npm and build as in the tutorial and finished the setup. Since I did not make any changes and just wanted to try to run makecode locally I skipped the parts ‘Refresh dal.d.ts files’ and ‘CODAL changes’ and directly did the step Running by executing pxt serve
But uppon trying the command pxt serve it always throws the error I attached in the error log. It seems as if it has mainly two problems: First of all it cannot resolve the expression 'game‘ in playable.ts and second of all it says that the property ‘percentChance’ does not exist on type ‘typeof Math’.
This finally leads to the error 'Build failed: target build failed: Compiler test failed
Error: Compiler test failed
at Object.userError …’
It opened a new tab in my explorer but it only showed the makecode logo and did not move on.
Afterwards I tried to fix the problem by following the step ‘Refresh dal.d.ts files’ oft he tutorial. This ended with: ‘error: sim/tsconfig.json expected compilerOptions.outFile:“…/built/sim.js”, got “undefined”’ but besides that it seemed to work.
Then I again tried pxt serve and I got the same error, except that this time it seemed to start the local server since I could open a new project.
I am still a little bit worried about the last error that said that the Build failed. What does that error mean and is it critical for the following steps of adding a new custom board?
Thanks in advance
Saskia
Errorlog:
C:\Users\MyPath\makecode\pxt-maker>pxt serve
Using target maker with build engine codal
target: v C:\Users\MyPath\makecode\pxt-maker
pxt-core: v C:\Users\MyPath\makecode\pxt
building C:\Users\MyPath\makecode\pxt-maker\node_modules\pxt-common-packages\sim…
[run] cd C:\Users\MyPath\makecode\pxt-maker\node_modules\pxt-common-packages\sim; node …/node_modules/typescript/bin/tsc
log strings: 24 files; 0 strings → sim-strings.json
copying common-sim…
C:/Users/MyPath/makecode/pxt-maker/node_modules/@types/node/index.d.ts(35,1): error TS1084: Invalid ‘reference’ directive syntax.
C:/Users/MyPath/makecode/pxt-maker/node_modules/@types/node/index.d.ts(43,30): error TS1005: ‘=’ expected.
C:/Users/MyPath/makecode/pxt-maker/node_modules/@types/node/index.d.ts(46,30): error TS1005: ‘=’ expected.
C:/Users/MyPath/makecode/pxt-maker/sim/dalboard.ts(174,87): error TS1109: Expression expected.
C:/Users/MyPath/makecode/pxt-maker/sim/dalboard.ts(174,93): error TS1109: Expression expected.
C:/Users/MyPath/makecode/pxt-maker/sim/dalboard.ts(174,126): error TS1005: ‘:’ expected.
building target.json in C:\Users\MyPath\makecode\pxt-maker…
building C:\Users\MyPath\makecode\pxt-maker\libs\base
building C:\Users\MyPath\makecode\pxt-maker\libs\base—light
…
building C:\Users\MyPath\makecode\pxt-maker\libs\game
building C:\Users\MyPath\makecode\pxt-maker\libs\game—light
building C:\Users\MyPath\makecode\pxt-maker\libs\mixer
playable.ts(36,9): error TS2304: Cannot find name ‘game’.
playable.ts(40,9): error TS2304: Cannot find name ‘game’.
soundEffect.ts(310,22): error TS2339: Property ‘percentChance’ does not exist on type ‘typeof Math’.
soundEffect.ts(320,67): error TS2339: Property ‘percentChance’ does not exist on type ‘typeof Math’.
building C:\Users\MyPath\makecode\pxt-maker\libs\mixer—none
playable.ts(36,9): error TS2304: Cannot find name ‘game’.
playable.ts(40,9): error TS2304: Cannot find name ‘game’.
soundEffect.ts(310,22): error TS2339: Property ‘percentChance’ does not exist on type ‘typeof Math’.
soundEffect.ts(320,67): error TS2339: Property ‘percentChance’ does not exist on type ‘typeof Math’.
… and many other similar errors
…
building C:\Users\MyPath\makecode\pxt-maker\libs\wifi—esp32
building C:\Users\MyPath\makecode\pxt-maker\libs\mqtt
building C:\Users\MyPath\makecode\pxt-maker\libs\azureiot
azureiot.ts(38,35): error TS2304: Cannot find name ‘crypto’.
building C:\Users\MyPath\makecode\pxt-maker\libs\settings
building C:\Users\MyPath\makecode\pxt-maker\libs\settings—esp32
… again some building and similar errors as those before
pxt_modules/mixer—samd/soundEffect.ts(320,67): error TS2339: Property ‘percentChance’ does not exist on type ‘typeof Math’.
*** Build failed: target build failed: Compiler test failed
Error: Compiler test failed
at Object.userError (C:\Users\MyPath\makecode\pxt\built\pxt.js:98791:25)
at C:\Users\MyPath\makecode\pxt\built\pxt.js:164148:19
at async C:\Users\MyPath\makecode\pxt\built\pxt.js:162696:19
at async C:\Users\MyPath\makecode\pxt\built\pxt.js:99398:42
at async Promise.all (index 0)
at async promisePoolAsync (C:\Users\MyPath\makecode\pxt\built\pxt.js:99404:21)
at async buildTargetCoreAsync (C:\Users\MyPath\makecode\pxt\built\pxt.js:162678:5)
at async buildTarget (C:\Users\MyPath\makecode\pxt\built\pxt.js:162943:13)
at async buildAndWatchTargetAsync (C:\Users\MyPath\makecode\pxt\built\pxt.js:162970:5)
Starting server in C:\Users\MyPath\makecode\pxt-maker
With pxt core at C:\Users\MyPath\makecode\pxt
starting local ws server at 3233…
To launch the editor, open this URL:
http://localhost:3232/#local_token=b76f132c-ad13-42b2-7388-1f607dec50b1&wsport=3233
opening http://localhost:3232/#local_token=b76f132c-ad13-42b2-7388-1f607dec50b1&wsport=3233