amazon-chime-sdk-js icon indicating copy to clipboard operation
amazon-chime-sdk-js copied to clipboard

Fails to build on Windows 10

Open HaydenFaulkner opened this issue 2 years ago • 6 comments

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 avatar Oct 13 '23 04:10 HaydenFaulkner

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

andrii-hrytsyshyn avatar Oct 18 '23 07:10 andrii-hrytsyshyn

Used Linux instead of Windows

HaydenFaulkner avatar Oct 18 '23 07:10 HaydenFaulkner

Any news here?

tkulis avatar Nov 16 '23 09:11 tkulis

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

andrii-hrytsyshyn avatar Nov 16 '23 09:11 andrii-hrytsyshyn

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

burnhamrobertp avatar Dec 20 '23 15:12 burnhamrobertp

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.

SneakyTurtle20 avatar Apr 22 '24 12:04 SneakyTurtle20

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

rlu-xseed avatar Jun 07 '24 15:06 rlu-xseed

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.

dinmin-amzn avatar Jun 26 '24 20:06 dinmin-amzn