How to build successfully a custom widget?

0
Hi, I have been trying to follow the HowTos to develop a Custom Widget in Mendix, but I’ve always come up against this error after the creation of the widget with the command:  yo @mendix/widget TextBox Generator, version: 8.10.0 Issues? Please report them at : https://github.com/mendix/widgets-resources/issues ? What is the name of your widget? TextBox ? Enter a description for your widget My widget description ? Organization name Mendix ? Add a copyright 2020 Mendix Technology BV ? Add a license Apache-2.0 ? Initial version 1.0.0 ? Author John ? Mendix project path ./../.. ? Which programming language do you want to use for the widget? JavaScript ES6 ? Which type of widget are you developing? For web and hybrid mobile apps ? Which template do you want to use for the widget? Full Boilerplate (recommended for beginners) ? Add unit tests for the widget ? (recommended for Full Boilerplate) Yes ? Add End-to-end tests for the widget ? (recommended for Full Boilerplate) Yes force ..\.yo-rc.json create package.json create src\package.xml create src\TextBox.xml create README.md create src\components\BadgeSample.jsx create src\TextBox.jsx create src\TextBox.editorPreview.jsx create src\ui\TextBox.css create src\components\Alert.jsx create .gitignore create .eslintrc.js create prettier.config.js create .gitattributes create LICENSE create src\components\__tests__\Alert.spec.jsx create src\components\__tests__\BadgeSample.spec.jsx create tests\e2e\TextBox.spec.js create tests\e2e\pages\home.page.js File configuration done, now running npm install to install development dependencies npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() > fibers_node_v8@3.1.5 preinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\fibers_node_v8 > node preinstall.js > fibers@4.0.3 install C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\fibers > node build.js || nodejs build.js `win32-x64-72` exists; testing Binary is fine; exiting > fibers_node_v8@3.1.5 install C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\fibers_node_v8 > node build.js ignore install > node-sass@4.14.1 install C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\node-sass > node scripts/install.js Cached binary found at C:\Users\utente\AppData\Roaming\npm-cache\node-sass\4.14.1\win32-x64-72_binding.node > core-js@3.6.5 postinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\core-js > node -e "try{require('./postinstall')}catch(e){}" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) > core-js-pure@3.6.5 postinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\core-js-pure > node -e "try{require('./postinstall')}catch(e){}" > core-js@2.6.11 postinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\fbjs-scripts\node_modules\core-js > node -e "try{require('./postinstall')}catch(e){}" > core-js@2.6.11 postinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\fbjs\node_modules\core-js > node -e "try{require('./postinstall')}catch(e){}" > core-js@2.6.11 postinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\metro-babel-register\node_modules\core-js > node -e "try{require('./postinstall')}catch(e){}" > ejs@3.1.3 postinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\ejs > node --harmony ./postinstall.js Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/) > node-sass@4.14.1 postinstall C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\node-sass > node scripts/build.js Binary found at C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox\node_modules\node-sass\vendor\win32-x64-72\binding.node Testing binary Binary is fine npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\@wdio\cli\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN notsup Unsupported engine for fibers_node_v8@3.1.5: wanted: {"node":">=8.0.0 <10.0.0"} (current: {"node":"12.18.2","npm":"6.14.6"}) npm WARN notsup Not compatible with your version of node/npm: fibers_node_v8@3.1.5 npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.18.2","npm":"6.14.6"}) npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN textbox@1.0.0 No repository field. added 1937 packages from 1041 contributors and audited 1940 packages in 65.338s 70 packages are looking for funding run `npm fund` for details found 11 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details > I will now run gulp to build the mpk (do this before open Mendix Studio Pro)< > textbox@1.0.0 lint C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox > pluggable-widgets-tools lint Running MX Widgets Tools script lint... Checking formatting... src\components\__tests__\Alert.spec.jsx src\components\__tests__\BadgeSample.spec.jsx src\components\Alert.jsx src\components\BadgeSample.jsx src\TextBox.editorPreview.jsx src\TextBox.jsx Code style issues found in the above file(s). Forgot to run Prettier? npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! textbox@1.0.0 lint: `pluggable-widgets-tools lint` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the textbox@1.0.0 lint script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\utente\AppData\Roaming\npm-cache\_logs\2020-07-09T13_53_05_919Z-debug.log > textbox@1.0.0 build C:\Users\utente\Documents\Mendix Widgets\CustomWidgets\textBox > pluggable-widgets-tools build:web Running MX Widgets Tools script build:web... [15:53:07] Local gulp not found in ~\Documents\Mendix [15:53:07] Try running: npm install gulp npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! textbox@1.0.0 build: `pluggable-widgets-tools build:web` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the textbox@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\utente\AppData\Roaming\npm-cache\_logs\2020-07-09T13_53_07_275Z-debug.log Widget successfully built!! Please open Mendix Studio Pro and start playing with your new widget. force .yo-rc.json What is the cause of this issue?   I have followed the following guide as well, but had the same issues ( https://medium.com/mendix/how-to-react-to-the-new-way-mendix-widgets-are-be-build-675e43599925 ) . I have installed gulp both locally and in the system.
asked
1 answers
0

Local gulp not found  problem:

Its a problem with spaces in the path.

There is a fix for it:

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

answered