How can i build a local metamask from github repo?

Hi

i have downloaded the code from github, run the commands

corepack enable
corepack prepare yarn@stable --activate

i am using node 16.20.0

i have gotten an infra project id, and i put it in my .metamaskrc file, which itself is a copy of the .metamaskrc.dist file

then i run

yarn install yarn start

and after doing stuff the system just hangs, the last lines being

[20:55:24] C:\development\samples\matamaskplugin\metamask-extension\dist\firefox\ui-1.js reloaded. [20:55:24] C:\development\samples\matamaskplugin\metamask-extension\dist\firefox\ui-2.js reloaded. [20:55:24] C:\development\samples\matamaskplugin\metamask-extension\dist\chrome\common-4.js reloaded. [20:55:24] C:\development\samples\matamaskplugin\metamask-extension\dist\chrome\ui-1.js reloaded. [20:55:24] C:\development\samples\matamaskplugin\metamask-extension\dist\chrome\ui-2.js reloaded. [20:55:24] C:\development\samples\matamaskplugin\metamask-extension\dist\chrome\ui-4.js reloaded.

There isn’t a really useful or clear guide, so i’m not sure if i should be using yard start or yarn dist. yarn dist, however, just outputs nothing and hangs. i simply want a development version of MetaMask with my password inbuilt, which is why i am doing all of this.

Hello @foghorn !
Welcome to MetaMask community !

Is your yarn updated to v3 ?
Can we see or read the full error logs for better understanding ?

1 Like

There were literally no errors - it just stopped and hung at the point indicated. However, on further work it seems that after reaching that point (with yarn start) the acutal build (and any changes made) ARE sent to the dist directory.
I can then package that and use that in chrome, which is fine. It’s just odd that yarn start doesn’t seem to terminate gracefully.
Yarn build never ran anything (and certainly no build file was produced).

Yarn is 3.2.4, node is 16.20.0 on a Windows 11 machine.

In terms of error logs - the .yarn dir doesn’t seem to have a logs dir, so i wouldn’t know where to find them.

amazing. so i discover that yarn start does not “end”, it just sits waiting for new changes and then exectutes the build process.

thanks to Frederik Bolding for that.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.