Problem with creating a custom widget

1
while doing the crash course (from rapid path), it asks to create the custom widget. from the section: https://academy.mendix.com/link/module/328/lecture/2536/11.4.1-Setting-Up-Your-Development-Environment First few command that was asked to be executed was :  -- npm install -g yo @mendix/generator-widget gulp -- mkdir CustomWidgets -- cd CustomWidgets the last command was: [yo @mendix/widget ShiftCalendar] After this command i get the following error: AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\generators\app\templates\commons\.gitignore     at EditionInterface.exports.copy (C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\node_modules\mem-fs-editor\lib\actions\copy.js:49:3)     at EditionInterface.module.exports [as copyTpl] (C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:28:8)     at MxGenerator._copyTemplate (C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\generators\app\index.js:248:17)     at MxGenerator._writeUtilityFiles (C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\generators\app\index.js:169:14)     at MxGenerator.writing (C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\generators\app\index.js:57:14)     at Object.<anonymous> (C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\node_modules\yeoman-generator\lib\index.js:976:25)     at C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\node_modules\run-async\index.js:49:25     at new Promise (<anonymous>)     at C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\node_modules\run-async\index.js:26:19     at runLoop.add.once.once (C:\Users\<USER>\AppData\Roaming\npm\node_modules\@mendix\generator-widget\node_modules\yeoman-generator\lib\index.js:977:11) Could someone help in this regard?
asked
1 answers
0

Try placing an empty .gitignore file in the directory its complaining about.

Alternatively, take the file straight from the official repo and place it there:
https://github.com/mendix/widgets-resources
 

 

Edit:
Found your solution:

https://github.com/mendix/widgets-resources/issues/285

A user said:
The file is missing from the distribution. I took the file from https://github.com/mendix/widgets-resources/blob/master/packages/tools/generator-widget/generators/app/templates/commons/.gitignore and placed it in the location mentioned in the error. I can now generate a widget.

answered