Build a Pluggable widget Learning path

0
Hi, I am trying to build my first pluggable widget. but getting this error after running – Unknown widget 'mendix.entertoaction.Entertoaction'. I’m adding all the steps which I have followed. can anyone help me on this. Thanks PS C:\CustomWidget> yo @mendix/widget enter-to-action       __  ____   __            _     _            _      |  \/  \ \ / /           (_)   | |          | |      | \  / |\ V /   __      ___  __| | ____  ___| |_      | |\/| | > <    \ \ /\ / / |/ _  |/ _  |/ _ \ __|      | |  | |/ . \    \ V  V /| | (_| | (_| |  __/ |_      |_|  |_/_/ \_\    \_/\_/ |_|\__._|\__. |\___|\__|                                         __/ |                                        |___/      Widget Generator, version: 9.2.1 ? What is the name of your widget? entertoaction ? Enter a description for your widget this is my first widget ? Organization name mendix ? Add a copyright MIT ? Add a license Apache-2.0 ? Initial version 1.0.0 ? Author shaan ? Mendix project path C:\UserData\z004atuv\Documents\Mendix\PluggableWidget-main ? Which programming language do you want to use for the widget? JavaScript ES6 ? Which type of components do you want to use? Class Components ? Which type of widget are you developing? For web and hybrid mobile apps ? Which template do you want to use for the widget? Empty widget (recommended for more experienced developers) ? Add unit tests for the widget ? (recommended for Full Boilerplate) No ? Add End-to-end tests for the widget ? (recommended for Full Boilerplate) No     force ..\Users\z004atuv\.yo-rc-global.json    create enter-to-action\package.json    create enter-to-action\src\package.xml    create enter-to-action\src\Entertoaction.xml    create enter-to-action\README.md    create enter-to-action\src\Entertoaction.jsx    create enter-to-action\src\Entertoaction.editorConfig.js    create enter-to-action\src\components\HelloWorldSample.jsx    create enter-to-action\src\Entertoaction.editorPreview.jsx    create enter-to-action\src\ui\Entertoaction.css    create enter-to-action\.gitignore    create enter-to-action\.eslintrc.js    create enter-to-action\prettier.config.js    create enter-to-action\.prettierignore    create enter-to-action\.gitattributes    create enter-to-action\LICENSE File configuration done, now running npm install to install dependencies No change to package.json was detected. No package manager install will be executed. npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details. npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0 added 2042 packages, and audited 2043 packages in 2m 166 packages are looking for funding   run `npm fund` for details found 0 vulnerabilities > I will now run Pluggable Widgets Tools to build the widget mpk. < > entertoaction@1.0.0 lint:fix > pluggable-widgets-tools lint:fix Running MX Widgets Tools script lint:fix... src\components\HelloWorldSample.jsx 120ms src\Entertoaction.editorConfig.js 22ms src\Entertoaction.editorPreview.jsx 12ms src\Entertoaction.jsx 11ms C:\CustomWidget\enter-to-action\src\Entertoaction.jsx   4:1  warning  Expected 'none' syntax before 'single' syntax  sort-imports ✖ 1 problem (0 errors, 1 warning) > entertoaction@1.0.0 build > pluggable-widgets-tools build:web Running MX Widgets Tools script build:web... Project Path: C:\\UserData\\z004atuv\\Documents\\Mendix\\PluggableWidget-main C:\CustomWidget\enter-to-action\src\Entertoaction.jsx → dist\tmp\widgets\mendix\entertoaction\Entertoaction.js... (node:2160) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./dist/" in the "exports" field module resolution of the package at C:\CustomWidget\enter-to-action\node_modules\rollup\package.json. Update this package.json to use a subpath pattern like "./dist/*". (Use `node --trace-deprecation ...` to show where the warning was created) created dist\tmp\widgets\mendix\entertoaction\Entertoaction.js in 840ms C:\CustomWidget\enter-to-action\src\Entertoaction.jsx → dist\tmp\widgets\mendix\entertoaction\Entertoaction.mjs... created dist\tmp\widgets\mendix\entertoaction\Entertoaction.mjs in 194ms C:\CustomWidget\enter-to-action\src\Entertoaction.editorPreview.jsx → dist\tmp\widgets\Entertoaction.editorPreview.js...created dist\tmp\widgets\Entertoaction.editorPreview.js in 320ms C:\CustomWidget\enter-to-action\src\Entertoaction.editorConfig.js → dist\tmp\widgets\Entertoaction.editorConfig.js... created dist\tmp\widgets\Entertoaction.editorConfig.js in 765ms  Widget successfully built!! Please open Mendix Studio Pro and start playing with your new widget. PS C:\CustomWidget> code .\enter-to-action\ PS C:\CustomWidget>  
asked
1 answers
7

Hi shaan ahmed,

Have you renamed the company name or widget name in package.json after the first build, I did face this issue when I changed the values in package.json

If yes, you can rename it properly to resolve this issue

 

Thanks!

answered