Skip to content

Fix Foundry artifact paths#30

Merged
antoinedc merged 2 commits into
tryethernal:developfrom
pmikolajczyk41:develop
Feb 14, 2025
Merged

Fix Foundry artifact paths#30
antoinedc merged 2 commits into
tryethernal:developfrom
pmikolajczyk41:develop

Conversation

@pmikolajczyk41
Copy link
Copy Markdown
Contributor

Newer Foundry distributions put path to the artifact's json under <Solidity version> / "default" / "path". Without that fix, current CLI fails with:

Using workspace "Playground"
Detected Foundry project for /my-foundry-project
node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
    at new NodeError (node:internal/errors:405:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:1171:7)
    at readFoundrySolidityCache (/usr/local/lib/node_modules/ethernal/bin/index.js:459:30)
    at FSWatcher.<anonymous> (/usr/local/lib/node_modules/ethernal/bin/index.js:488:35)
    at FSWatcher.emit (node:events:517:28)
    at FSWatcher.emitWithAll (/usr/local/lib/node_modules/ethernal/node_modules/chokidar/index.js:540:8)
    at FSWatcher._emit (/usr/local/lib/node_modules/ethernal/node_modules/chokidar/index.js:632:8)
    at NodeFsHandler._handleFile (/usr/local/lib/node_modules/ethernal/node_modules/chokidar/lib/nodefs-handler.js:400:14)
    at NodeFsHandler._addToNodeFs (/usr/local/lib/node_modules/ethernal/node_modules/chokidar/lib/nodefs-handler.js:637:21) {
  code: 'ERR_INVALID_ARG_TYPE'
}

@antoinedc antoinedc merged commit 9134c0a into tryethernal:develop Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants