Unable to create Custom Widgets

0
I am doing Crash course of Mendix and while trying custom widget option I am unable to get desired results after executing “yo mendix” command. Section 11.3.3 Training Info .yo repository is being created by the command and it complains that folder is not empty. Step1: Empty directory D:\Training\Mendix\Code\CustomWidget\ShiftCalendar>dir  Volume in drive D is Apps  Volume Serial Number is B086-EA0E  Directory of D:\Training\Mendix\Code\CustomWidget\ShiftCalendar 05/14/2020  08:00 AM    <DIR>          . 05/14/2020  08:00 AM    <DIR>          ..                0 File(s)              0 bytes                2 Dir(s)  152,257,298,432 bytes free Step2: yo mendix D:\Training\Mendix\Code\CustomWidget\ShiftCalendar>yo mendix  Generator, version: 2.2.5  Issues? Please report them at : https://github.com/mendix/generator-mendix/issues  The directory is not empty and we cannot detect a widget.  If you are creating a new widget, please open the generator in an empty folder.  If you want to upgrade a widget, make sure you are using the generator in a widget folder. Step3: Error because directory is not empty D:\Training\Mendix\Code\CustomWidget\ShiftCalendar>dir  Volume in drive D is Apps  Volume Serial Number is B086-EA0E  Directory of D:\Training\Mendix\Code\CustomWidget\ShiftCalendar 05/14/2020  08:01 AM    <DIR>          . 05/14/2020  08:01 AM    <DIR>          .. 05/14/2020  08:01 AM    <DIR>          .yo-repository                0 File(s)              0 bytes                3 Dir(s)  152,257,298,432 bytes free      
asked
1 answers
0

Found the solution at https://github.com/mendix/generator-mendix/issues/38

C:\Users<your_username>\AppData\Roaming\npm\node_modules\generator-mendix\generators\app\index.js
and edit line 75

From:

} else if (!extfs.isEmptySync(this.destinationRoot() )) {

To:

} else if (!extfs.isEmptySync(this.destinationRoot() + '/aa')) {

 

answered