Custom Module - getting message : "Module automation doesn't exist"

UPDATE - I’m trying to use the files i created in accordance with the extensions - server-connect documentation… created a src/@enien/wappler-automation folder where i have moved the automation.hjson and automation.js files + other utilities used. trying to make that work.. but having problems - when i try and add a server-connect action, previously there would be an automation folder where i’d find the action… this has gone and cant see where i can find the automation action??? will continue stumbling along. any advice greatly appreciated

Hi, I have been trying to introduce a custom module that will use puppeteer to run automated tests. Over the last 2-3 weeks sometimes the module has been found/exists and sometimes it hasnt. (sadly when it has been recognised the logic/flow hasnt been correct so have needed to re-write and then it no longer works)

The rules ive used are:

  • automation.js, automation.hjson are both in the extensions, server_connect,modules folder
  • the automation.hjson file specifies module: 'automation' being careful to make sure lower case automation is used.
  • I’ve deleted old calls to the automation module from server_connect, then restarted wappler so that the new module is registered and then insert a new automation action
  • re built, tested then got the error
  • message: "Module automation doesn't exist"
  • stack: "Error: Module automation doesn't exist\n at App._exec (/app/lib/core/app.js:742:19)\n at App._exec (/app/lib/core/app.js:716:20)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async App.exec (/app/lib/core/app.js:682:5)\n at async App.define (/app/lib/core/app.js:664:5)"
  • status: "500"

I’ve been trying to use AI agents but keep being told I’m awesome and have great insight and the last bullet-proof solution they made should be replaced with another, then another. Clearly im not awesome or have great insight and tired of going around the same loop of their bullet-proof solutions that will completely align with everything i hold dear …. sorry AI is great …. but…

Any suggestions would be greatly appreciated.

Thanks

I see this a lot when developing extensions.
Ironically i am planning to submit a bug report about it today.
While the error message is not identical to that i observe, the cause may be the same. Basically it is a "false flag" message which is actually caused by a missing dependency called as an "import"

Assuming you have import statements in your .js file, you need to manually add the npms via terminal as they are not installed automatically unless installed from npm with the dependencies deckared in your package.json and your .hjson file.

DM your files if you want me to take a look.

P.S. if i believed in every bullet-proof solution offered by Gemini i would gave been shot and died long ago!