Skip to content

docs(user): deleting tasks/ folder makes compilation fail #1013

@enitrat

Description

@enitrat

Category

  • docs(user) — user-facing content: guides, tutorials, concept explanations, etc.
  • docs(api) — interfaces: contracts, SDKs, plugin APIs, etc.
  • docs(code) — code examples, templates, scripts, tests, etc.
  • docs(misc) — structure, navigation, styling, feedback, housekeeping, etc.

Context / Background

Inside the setup instructions, it is advised to reset the hardhat project by running

rm -rf test/* src/* tasks/* deploy ./fhevmTemp ./artifacts ./cache ./coverage ./types ./coverage.json ./dist

Doing this will remove the tasks/ folder content.

Later on, we are tasked to write a simple contract and compile it, running

❯ npx hardhat compile

Which fails with:

An unexpected error occurred:

Error: Cannot find module './tasks/accounts'
Require stack:
- /Users/msaug/workspace/fhevm-template/hardhat.config.ts
- /Users/msaug/workspace/fhevm-template/node_modules/hardhat/internal/core/config/config-loading.js
- /Users/msaug/workspace/fhevm-template/node_modules/hardhat/internal/cli/cli.js
- /Users/msaug/workspace/fhevm-template/node_modules/hardhat/internal/cli/bootstrap.js
    at Module.<anonymous> (node:internal/modules/cjs/loader:1405:15)
    at Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/msaug/workspace/fhevm-template/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
    at Module._load (node:internal/modules/cjs/loader:1215:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1491:12)
    at require (node:internal/modules/helpers:135:16)
    at Object.<anonymous> (/Users/msaug/workspace/fhevm-template/hardhat.config.ts:12:1) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/msaug/workspace/fhevm-template/hardhat.config.ts',
    '/Users/msaug/workspace/fhevm-template/node_modules/hardhat/internal/core/config/config-loading.js',
    '/Users/msaug/workspace/fhevm-template/node_modules/hardhat/internal/cli/cli.js',
    '/Users/msaug/workspace/fhevm-template/node_modules/hardhat/internal/cli/bootstrap.js'
  ]
}

The tasks/ folder should likely not be deleted; or the instructions need to be updated

Target Files/Pages

https://docs.zama.ai/protocol/solidity-guides/getting-started/setup
https://docs.zama.ai/protocol/solidity-guides/getting-started/quick-start-tutorial/write_a_simple_contract

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions