aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
699 stars 471 forks source link

Fails to build on Windows 10 #2779

Closed HaydenFaulkner closed 3 weeks ago

HaydenFaulkner commented 9 months ago

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

andrii-hrytsyshyn commented 9 months ago

@HaydenFaulkner I have the same problem. Do you know how to fix it?

HaydenFaulkner commented 9 months ago

Used Linux instead of Windows

tkulis commented 8 months ago

Any news here?

andrii-hrytsyshyn commented 8 months ago

@tkulis No, I started working on Mac. Everything works fine there

burnhamrobertp commented 7 months ago

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.

  1. Navigate to amazon-chime-sdk-js root directory, run node script/barrelize.js && node script/generate-version.js
  2. Edit generate-red-worker-code.js and comment out the line runCommandWithLogs('./node_modules/typescript/bin/tsc --build config/tsconfig.red.json');
  3. Run npm run red
  4. Run ./node_modules/typescript/bin/tsc --build config/tsconfig.red.json to transpile the RedundantAudioEncoder (since we commented it out in step 2 to keep it from erroring in step 3)
  5. cd into the demos/browser directory
  6. run npm run start
SneakyTurtle20 commented 2 months ago

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.

rlu-xseed commented 1 month ago

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, "")

dinmin-amzn commented 3 weeks ago

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.