'jsdoc error ENOENT: no such file or directory, open './readme/readme.md'

I have already installed jsdoc with npm i -D jsdoc command and created jsdoc.json file. In package.json file there is script called doc and after doing npm run doc jsdoc throws an error Error: ENOENT: no such file or directory, open './readme/readme.md'

package.json

{
  "name": "alphabetdb",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "type": "module",
  "scripts": {
    "start": "node index.js",
    "doc": "jsdoc -c jsdoc.json"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "jsdoc": "^3.6.10"
  }
}

jsdoc.json

{
  "source": {
    "include": ["src"],
    "includePattern": ".js$",
    "excludePattern": "(node_modules/|docs)"
  },
  "plugins": ["plugins/markdown"],
  "templates": {
    "cleverLinks": true,
    "monospaceLinks": true
  },
  "opts": {
    "recurse": true,
    "destination": "./docs/",
    "template": "./custom-template",
    "tutorials": "./tutorials",
    "readme": "./readme/readme.md"
  }
}

file tree

node_modules/
src/
    fileSystem.js
index.js
jsdoc.js
package-lock.json
package.json


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source