Skip to content

Unable to save. Error:callback is not a function #1

@tkodev

Description

@tkodev

Code:

var editor = require('front-matter-editor');
var mdPath = "/Users/sysuser/Google Drive/projects/public/code/htko/site-base/scripts/README.md";
editor.read(mdPath).data(function(data,matter){
  data.photo.unshift( data.cover );
  delete data.cover;
  matter.data = data;
}).save(mdPath, {prefix:"test-"});

Error:

/Users/sysuser/Google Drive/projects/public/code/htko/site-base/scripts/node_modules/front-matter-editor/index.js:65
      callback(err, data);
      ^

TypeError: callback is not a function
    at fs.writeFile (/Users/sysuser/Google Drive/projects/public/code/htko/site-base/scripts/node_modules/front-matter-editor/index.js:65:7)
    at fs.js:1305:7
    at FSReqWrap.oncomplete (fs.js:123:15)

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