amazon-chime-sdk-js
amazon-chime-sdk-js copied to clipboard
Fails to build on Windows 10
What happened and what did you expect to happen?
upon running the initial npm run build, the process fails on:
'.' is not recognized as an internal or external command,
operable program or batch file.
Error: Command failed: ./node_modules/typescript/bin/tsc --build config/tsconfig.red.json
'.' is not recognized as an internal or external command,
operable program or batch file.
Attempted on Windows 10 (OS build 19045.3570). Tried building on Linux system and builds as expected.
Have you reviewed our existing documentation?
Reproduction steps
Run npm run build in amazon-chime-sdk-js-main
Amazon Chime SDK for JavaScript version
NA
What browsers are you seeing the problem on?
NA
Browser version
NA
Meeting and Attendee ID Information.
No response
Browser console logs
NA
@HaydenFaulkner I have the same problem. Do you know how to fix it?
Used Linux instead of Windows
Any news here?
@tkulis No, I started working on Mac. Everything works fine there
This can be done with some extra work that I pieced together from other (similar) issues. The root of the problem stems from the generate-red-worker-code file's attempt to run the relatively pathed call to tsc.
- Navigate to amazon-chime-sdk-js root directory, run
node script/barrelize.js && node script/generate-version.js - Edit
generate-red-worker-code.jsand comment out the linerunCommandWithLogs('./node_modules/typescript/bin/tsc --build config/tsconfig.red.json'); - Run
npm run red - Run
./node_modules/typescript/bin/tsc --build config/tsconfig.red.jsonto transpile the RedundantAudioEncoder (since we commented it out in step 2 to keep it from erroring in step 3) - cd into the demos/browser directory
- run
npm run start
Any news on this one working in windows? I have ran into this error as well.
I have tried this in windows https://github.com/aws/amazon-chime-sdk-js/issues/2779#issuecomment-2069253310
But still didn't work out for me.
Try modifying file script/generate-red-worker-code.js
In line 42. Change from:
runCommandWithLogs('./node_modules/typescript/bin/tsc --build config/tsconfig.red.json');
to:
runCommandWithLogs('tsc --build config/tsconfig.red.json');
and in line 53 address the CR. Change from: `.replace(/"/g, ''').replace(/\n/g, "\n") to: `.replace(/"/g, ''').replace(/\n/g, "\n").replace(/\r/g, "")
A fix has been merged in this PR https://github.com/aws/amazon-chime-sdk-js/pull/2913. Thanks for bringing this to our attention. Closing this issue now.