Skip to content

code ELOCKED during compile if importing in config file #537

@aerth

Description

@aerth

Adding the import breaks compilation. Maybe because Lots of contracts in the ./contracts directory... Tried putting on the top, or bottom of imports, same error. Removed the import, compilation works (but then script fails because it needs import)

The validations.json file starts to grow, and then the error is thrown.

I can add more info if needed. Maybe its a version mismatch somewhere.

here is the top of hardhat-config.ts

import { HardhatUserConfig, task } from "hardhat/config";
import "@openzeppelin/hardhat-upgrades"; // moved to bottom, top, same error
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "solidity-coverage";

here is the error when compiling with @openzeppelin

An unexpected error occurred:

Error: Lock file is already being held
    at /path/to/repo/node_modules/proper-lockfile/lib/lockfile.js:68:47
    at callback (/path/to/repo/node_modules/graceful-fs/polyfills.js:299:20)
    at FSReqCallback.oncomplete (node:fs:199:5) {
  code: 'ELOCKED',
  file: '/path/to/repo/cache/validations.json'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions