steveush / foodoc

A Bootstrap and Handlebars based JSDoc3 template.
GNU General Public License v3.0
24 stars 14 forks source link

TypeError: template.raw.data.insert is not a function #21

Open kumarajiv1 opened 1 year ago

kumarajiv1 commented 1 year ago

Hello, not sure if it's just me. Following installation steps based on readme and referencing to this tutorial

I am getting following error when running script to generate doc. Appreciate you help and guidance. Thank you

/node_modules/foodoc/template/utils/postProcessor.js:114
        template.raw.data.insert(doclet);
TypeError: template.raw.data.insert is not a function
    at Object.exports.registerReadme (/node_modules/foodoc/template/utils/postProcessor.js:114:20)

template.raw

{
  data: [Function: db] { sort: [Function (anonymous)] },
  opts: {
    _: [ 'cypress/e2e/step_definitions/common_steps.js' ],
    configure: 'conf.json',
    template: '/node_modules/foodoc/template',
    recurse: true,
    destination: './out/',
    encoding: 'utf8',
    readme: undefined
  },
  tutorials: RootTutorial {
    longname: '',
    name: '',
    title: '',
    content: '',
    type: null,
    parent: null,
    children: [],
    _tutorials: {}
  }
}`
sidiabale commented 1 year ago

I had the same issue. Downgrading to "jsdoc": "^3.6.11" in my package.json solved it!