nystudio107 / generator-craftplugin

generator-craftplugin is a Yeoman generator for Craft CMS plugins
MIT License
73 stars 30 forks source link

Since node 10, it is mandatory to pass a callback on fs.writefile() #92

Closed gfra54 closed 4 years ago

gfra54 commented 4 years ago

Since node 10, it is mandatory to pass a callback on fs.writefile() This was not the case on line 294 of the index.js file, so it was throwing the following error : Callback must be a function. Received 'utf8' I added an empty callback function to correct the problem. It works now. Feel free to let me know if I made any mystake. Thank you for ,your work, and have a nice day.

gwillz commented 4 years ago

This is reported in #70 #71 #72. Node 8 is not supported. Node 10 is the oldest LTS now.

khalwat commented 4 years ago

Fixed this with writeFileSync() -> https://github.com/nystudio107/generator-craftplugin/commit/3d22216593d84ec809c6087115d5b5eeeb40312e