# Local Internet-identity front-end build is failing

**URL:** https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876
**Category:** Developers
**Created:** [November 26, 2022, 6:53pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876 "2022-11-26T18:53:35Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 26, 2022, 6:53pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/1 "2022-11-26T18:53:35Z")

</div>

I just cloned the the repo for the internet identity canister and UI. can anyone help me resolve this issue? I am using Mac M1 os. I’m trying to run the repo locally, using the instructions from [here](https://github.com/dfinity/internet-identity/tree/main/demos/using-dev-build)  
but when I run the following command:

```auto
dfx deploy --no-wallet --argument '(null)'

```

I’m getting this error message in the console:

````auto
Building canisters...
Building frontend...
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed to build call canisters.
    Failed while trying to build all canisters.
      The post-build step failed for canister 'rwlgt-iiaaa-aaaaa-aaaaa-cai' (internet_identity) with an embedded error: No such file or directory (os error 2)```
````

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 1:54am UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/2 "2022-11-27T01:54:09Z")

</div>

on another note, I consistently run into problems when upgrading to the most recent repo fo the internet identity and trying to run it locally. Each time i pull the latest version of the internet identity repo, i encounter some sort of build fail thats specific to Mac M1 OS. The solution to the issue often requires multiple days of searching through the forum and through github for solutions to the issue and that often stalls development for a few days. I think it’d be really helpful if the `README.md` file included a separate set of instructions for users operation on Mac M1 OS. @diegop could you see to it that the right person is CC’d on this?

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 7:38am UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/3 "2022-11-27T07:38:07Z")

</div>

You want to debug or develop II locally or you want to deploy II locally to develop your own app?

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 10:04am UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/5 "2022-11-27T10:04:52Z")

</div>

@peterparker , i want to deploy II canister locally. And I’m getting the above error message when i attempt to do so.

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 12:35pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/6 "2022-11-27T12:35:36Z")

</div>

I gonna assume you want to deploy II to work on your dapp - i.e. not to implement something within II.

As I actually answered this question few times (here on the [forum](https://forum.dfinity.org/t/internet-identity-setup-locally/15767/2), discord or twitter), I thought that I was maybe actually worth a blog post. So, here you go.

> **[Deploy Internet Identity locally](https://6zvwc-sqaaa-aaaal-aalma-cai.raw.ic0.app/d/deploy-internet-identity-locally)**
>
> How to deploy the blockchain authentication system for the Internet Computer locally

Let me know if it works out for you?

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 1:11pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/7 "2022-11-27T13:11:48Z")

</div>

@peterparker I attempted option 2. I made sure that `dfx start` was running and I ran the following commands:

```auto
git clone https://github.com/dfinity/internet-identity
cd internet-identity/demos/using-dev-build
npm ci
dfx deploy --no-wallet --argument '(null)'

```

and the console is still giving me the following error:

```auto
Building canisters...
Building frontend...
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed to build call canisters.
    Failed while trying to build all canisters.
      The post-build step failed for canister 'rwlgt-iiaaa-aaaaa-aaaaa-cai' (internet_identity) with an embedded error: No such file or directory (os error 2)

```

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 1:26pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/8 "2022-11-27T13:26:52Z")

</div>

> [@Jesse](#):
>
> `dfx deploy --no-wallet --argument '(null)'`

Work out for me 🤷‍♂️.

Maybe you local dfx state is dirty? `dfx start --clean` maybe?

 ![Capture d’écran 2022-11-27 à 14.25.31](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/1/15097f14b21312937829fa65262e59505f1b29b7.jpeg)

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 1:32pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/9 "2022-11-27T13:32:45Z")

</div>

> [@peterparker](#):
>
> Maybe you local dfx state is dirty? `dfx start --clean` maybe?

i gave it a shot, and still no success. are you using Mac M1?

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 1:36pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/10 "2022-11-27T13:36:22Z")

</div>

I got a M2.

Super weird. Have you try the first method? Same result?

P.S.: Just updated the article to simplify the 1. solution

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 1:42pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/11 "2022-11-27T13:42:45Z")

</div>

@peterparker haven’t tried the first method just yet. I just upgraded to the latest dfx version and gave it another attempt. now I’m getting this error message:

```auto
Error: Failed to fetch root key.
Caused by: Failed to fetch root key.
  Encountered an error while trying to query the replica.
    An error happened during communication with the replica: error sending request for url (http://127.0.0.1:4943/api/v2/status): error trying to connect: tcp connect error: Connection refused (os error 61)

```

This error looks a bit more familiar.

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 1:43pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/12 "2022-11-27T13:43:58Z")

</div>

Ah I had that one too few minutes ago when I was double checking that the method worked out!

`dfx start --clean` and cloning II in a fresh repo solved it for me.

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 1:48pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/13 "2022-11-27T13:48:48Z")

</div>

And its working! thanks a bunch 🙏🏾

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 1:50pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/14 "2022-11-27T13:50:10Z")

</div>

Awesome! Happy to hear that 😃

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 2:04pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/15 "2022-11-27T14:04:14Z")

</div>

so, Its deploying, but for some reason, instead of the Internet identity UI, I’m seeing this:

 ![Screen Shot 2022-11-27 at 8.02.33 AM](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/3/30709bb3bb9e1de3e1b4e0ae7b5800a8261c2439.jpeg)

and when i click “Authenticate” its redirecting me to the II thats on mainnet.

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 2:26pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/16 "2022-11-27T14:26:03Z")

</div>

It’s probably because you collected the wrong canister ID for the local Internet Identity.

It’s that one I think

 ![Capture d’écran 2022-11-27 à 15.25.28](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/2/220e5e769ab059cb15143fc5e0d68f57e6cdbbae.jpeg)

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 4:34pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/17 "2022-11-27T16:34:33Z")

</div>

@peterparker I ended up having to change the URL for the local version of the II interface. It was still pointing to localhost:8000, but the last version of the II is deployed to localhost:4943. So I’ve gotten my project deployed locally along with the II. and now I’m getting an error message in the browser console.

I suspect this error is due to the fact that my II canister and my project aren’t running on the same port. My project is running on localhost:8000 while the II canister is running on localhost:4943.

Is there a solution to this that doesn’t involve me having to run both canisters on the same port?

if not, how do i go about changing the port that II canister runs on?

 ![Screen Shot 2022-11-27 at 10.31.22 AM](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/4/4d82392ee39b2d48fb6043e3a28d612d2b41fdcb.jpeg)

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 5:06pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/18 "2022-11-27T17:06:11Z")

</div>

Ummm I never run on that issue. Maybe the 2. solution does not fit well your setup. Can you give a try to the 1. one?

i.e. deploy II locally through dfx with following config

```auto
"internet_identity": {
      "type": "custom",
      "candid": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity.did",
      "wasm": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_dev.wasm",
      "shrink": false,
      "remote": {
        "candid": "internet_identity.did",
          "id": {
            "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
          }
        }
      }
	},

```

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 5:25pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/19 "2022-11-27T17:25:58Z")

</div>

I gave option 1 a try and it deploys fine, but this option doesn’t provide the II user interface that I need. I only get the backend canister. is there somewhere I could find the dfx configs for the UI of the II canister too?

---

<div class="post-metadata">

### Author: ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)
#### Post date: [November 27, 2022, 5:46pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/20 "2022-11-27T17:46:51Z")

</div>

> [@Jesse](#):
>
> the II user interface

Ummm that’s weird, in my projects using such method I get the II user interface - i.e. I can then use II to sign in locally with my dapps. As both methods works in my dapps and sample repo, not sure what’s the issue here.

Your project is open source?

---

<div class="post-metadata">

### Author: ![Jesse](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jesse/32/37836_2.png) [@Jesse](https://forum.dfinity.org/u/Jesse)
#### Post date: [November 27, 2022, 6:03pm UTC](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876/21 "2022-11-27T18:03:40Z")

</div>

I just changed the visibility so that you can see it. You can find it here at this link: [GitHub - JessAYrn/Digital-Time-Capsule](https://github.com/JessAYrn/Digital-Time-Capsule/)

[Next page](https://forum.dfinity.org/t/local-internet-identity-front-end-build-is-failing/16876.md?page=2)
