Getting below error while trying to setup Internet Identity in local

I am trying to do this setup in windows 10 wsl2.

Following @kpeacock tutorial.

@kpeacock, I had tried all the suggestions, you have given. But none of them is working. I am doing in my windows 10 wsl2. If any other alternative to start with an internet identity setup for my app, please suggest it?

Thanks

The error seems pretty straightforward, try removing the \r from src/internet_identity/build.sh

I didn’t get where to remove that one, but now it’s running and causing some new errors.

Also attaching build.sh code here for reference.

#!/usr/bin/env bash
set -euo pipefail

# Compile frontend assets to dist
echo Compiling frontend assets
npm run build

II_DIR="$(dirname "$0")"
TARGET="wasm32-unknown-unknown"

cargo build --manifest-path "$II_DIR/Cargo.toml" --target $TARGET --release -j1

# keep version in sync with Dockerfile
cargo install ic-cdk-optimizer --version 0.3.0 --root "$II_DIR"/../../target
STATUS=$?

if [ "$STATUS" -eq "0" ]; then
      "$II_DIR"/../../target/bin/ic-cdk-optimizer \
      "$II_DIR/../../target/$TARGET/release/internet_identity.wasm" \
      -o "$II_DIR/../../target/$TARGET/release/internet_identity.wasm"

  true
else
  echo Could not install ic-cdk-optimizer.
  false
fi