Mkc build fail

I’m trying to use mkc but whenever I try to build something (even an empty initialized project) I just get an exception:

(.venv) F:\MakeCode-Arcade-to-App\examples\Racers\Racers source>mkc build -j          
using project: F:\MakeCode-Arcade-to-App\examples\Racers\Racers source/pxt.json
Download new webapp
Download https://arcade.makecode.com/
Exception: SyntaxError: Expected ',' or '}' after property value in JSON at position 1542 (line 34 column 14)
    at JSON.parse (<anonymous>)
    at parseWebConfigAsync (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\node_modules\makecode-core\built\downloader.js:41:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.downloadAsync (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\node_modules\makecode-core\built\downloader.js:101:17)
    at async Project.loadEditorAsync (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\node_modules\makecode-core\built\mkc.js:166:27)
    at async resolveProject (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\node_modules\makecode-core\built\commands.js:131:5)
    at async buildCommandOnce (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\node_modules\makecode-core\built\commands.js:161:17)
    at async Command.buildCommand (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\built\cli.js:43:9)
    at async Command.parseAsync (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\node_modules\commander\lib\command.js:923:5)
    at async mainCli (C:\Users\ckyiu\AppData\Roaming\npm\node_modules\makecode\built\cli.js:213:5)
Build failed

Was wondering if anyone had any idea why this would happen?

1 Like

@UnsignedArduino i think you just need to update (npm install -g makecode)

2 Likes

Thanks, that worked! That doesn’t make sense at all though because I did yarn add makecode like 10 minutes ago and that didn’t work when I was in the project, now after installing with npm it worked. Or maybe cause I ran npx mkc instead of mkc. I have no idea what made it work…

1 Like

@UnsignedArduino our CLI doesn’t pick up the locally installed version, it assumes it’s always globally installed (though maybe it should)

2 Likes