~/dev $ mkdir test
~/dev $ cd test
~/dev/test $ forge init
Initializing /Users/devtooligan/dev/test...
{...}
Done.
~/dev/test master $ forge build
success.
~/dev/test master $ curl -O https://raw.githubusercontent.com/pbshgthm/blacksmith/main/blacksmith.js
node blacksmith.js create #in foundry project's root directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6917 100 6917 0 0 17788 0 --:--:-- --:--:-- --:--:-- 18060
running :: forge build
build :: failed
found :: 1 contracts
node:internal/fs/utils:344
throw err;
^
Error: ENOENT: no such file or directory, open './out/Contract.sol/0.json'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at getABI (/Users/devtooligan/dev/test/blacksmith.js:36:26)
at /Users/devtooligan/dev/test/blacksmith.js:234:21
at Array.forEach (<anonymous>)
at createBlacksmiths (/Users/devtooligan/dev/test/blacksmith.js:233:11)
at /Users/devtooligan/dev/test/blacksmith.js:19:17
at ChildProcess.exithandler (node:child_process:388:7)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: './out/Contract.sol/0.json'
}
fwiw I got the same error on an existing repo as well...