Last active
July 10, 2019 06:48
-
-
Save newbenhd/ffdf49ab028cdf79eb19dd25fae2d4e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return new Promise(async (resolve, reject) => { | |
try { | |
const depnString = JSON.stringify(this.depn); | |
await fs.writeFile(path.join(this.dest, this.fileName), depnString); | |
} catch (err) { | |
reject(err); | |
} | |
}); | |
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined | |
at maybeCallback (fs.js:142:9) | |
at Object.writeFile (fs.js:1175:14) | |
at /Users/myroot/Note/Node/The-Complete-Node.js-Developer-Course-3rd-Edition/node-course/depn/index.js:33:18 | |
at new Promise (<anonymous>) | |
at app.write (/Users/myroot/Note/Node/The-Complete-Node.js-Developer-Course-3rd-Edition/node-course/depn/index.js:30:12) | |
at Object.<anonymous> (/Users/myroot/Note/Node/The-Complete-Node.js-Developer-Course-3rd-Edition/node-course/depn-usage/app.js:5:6) | |
at Module._compile (internal/modules/cjs/loader.js:776:30) | |
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) | |
at Module.load (internal/modules/cjs/loader.js:643:32) | |
at Function.Module._load (internal/modules/cjs/loader.js:556:12) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment