cerc-io / stack-orchestrator

Read-only mirror of https://git.vdb.to/cerc-io/stack-orchestrator
https://git.vdb.to/cerc-io/stack-orchestrator
GNU Affero General Public License v3.0
29 stars 19 forks source link

Error on startup in fixturenet-optimism-contracts container in deployment mode #456

Open dboreham opened 1 year ago

dboreham commented 1 year ago

It says:

$ /app/node_modules/.bin/hardhat rekey-json --output /l2-accounts/keys.json
An unexpected error occurred:

Error: Cannot find module './verify-contract-deployment'
Require stack:
- /app/packages/contracts-bedrock/tasks/index.ts
- /app/packages/contracts-bedrock/hardhat.config.ts
- /app/node_modules/hardhat/internal/core/config/config-loading.js
- /app/node_modules/hardhat/internal/cli/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/app/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at Object.<anonymous> (/app/packages/contracts-bedrock/tasks/index.ts:12:1)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Object.require.extensions.<computed> [as .ts] (/app/node_modules/ts-node/src/index.ts:1621:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/app/packages/contracts-bedrock/tasks/index.ts',
    '/app/packages/contracts-bedrock/hardhat.config.ts',
    '/app/node_modules/hardhat/internal/core/config/config-loading.js',
    '/app/node_modules/hardhat/internal/cli/cli.js'
  ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
wait-for-it.sh: waiting 60 seconds for fixturenet-eth-geth-1:8545
wait-for-it.sh: fixturenet-eth-geth-1:8545 is available after 0 seconds
Using L1 RPC endpoint http://fixturenet-eth-geth-1:8545
yarn run v1.22.19
dboreham commented 1 year ago

Looks like this is caused by the container bind mounting files from the build directory (which shouldn't be allowed). The files should be in the associated config directory, or built directly into the container.