OpenZeppelin / solidity-docgen

Documentation generator for Solidity projects
MIT License
452 stars 118 forks source link

Cannot find module 'solidity-docgen' #389

Closed leovct closed 2 years ago

leovct commented 2 years ago

Hi, I'm facing an issue when I try to execute solidity-docgen v0.5.16 with hardhat.

$ npx hardhat docgen
You are using a version of Node.js that is not supported by Hardhat, and it may work incorrectly, or not work at all.

Please, make sure you are using a supported version of Node.js.

To learn more about which versions of Node.js are supported go to https://hardhat.org/nodejs-versions
An unexpected error occurred:

Error: Cannot find module 'solidity-docgen'
Require stack:
- /home/foo/hardhat.config.ts
- /home/foo/node_modules/hardhat/internal/core/config/config-loading.js
- /home/foo/node_modules/hardhat/internal/cli/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/foo/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:780:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/foo/hardhat.config.ts:9:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module.m._compile (/home/foo/node_modules/ts-node/src/index.ts:1597:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require.extensions.<computed> [as .ts] (/home/foo/node_modules/ts-node/src/index.ts:1600:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/foo/hardhat.config.ts',
    '/home/foo/node_modules/hardhat/internal/core/config/config-loading.js',
    '/home/foo/node_modules/hardhat/internal/cli/cli.js'
  ]
}

I also see the same error in hardhat.config.ts Screenshot 2022-06-12 at 00 11 10

frangio commented 2 years ago

solidity-docgen 0.5.16 is not a Hardhat plugin. Please use 0.6.