need help please i will pay
# 🤝help
s
error card:Calculation and composition of pension details based on user data. action Error executing action "inline-card:Calculation and composition of pension details based on user data..js" in flow:👂 Capturing Information:node:Standard1 Error executing action "inline-card:Calculation and composition of pension details based on user data..js" in flow:👂 Capturing Information:node:Standard1 [Error, Check dependency list! Synchronous require cannot resolve module 'luxon'. This is the first mention of this module!] {"scope":"bot-action","cardId":"card:Calculation and composition of pension details based on user data.","nodeId":"node:Standard1","workflowId":"flow:👂 Capturing Information"} this is the error i will pay you seriously
this is the code
please help me if the bot will go i pay 50 bucks to anyone who help me
s
it looks like your script is having trouble finding the luxon module when you're trying to run an action in Botpress. This is a common hiccup when the module isn't installed or the server just isn't picking it up for some reason. Here's a more straightforward rundown of how you can tackle this: Check if luxon is Installed: First up, let's make sure luxon is actually installed. You'd want to pop open your terminal, navigate to your Botpress server's root folder, and run npm install luxon. This command sorts out the installation if it's missing. Node.js Compatibility: Sometimes, the version of Node.js you're using might not play nice with your packages. It's a good idea to double-check that both Botpress and luxon are cool with your current Node.js version. Peek at package.json: Dive into your package.json file (it's in the root of your Botpress server directory) and see if luxon is listed under dependencies. If it's missing, the npm install luxon command should add it, but it doesn't hurt to make sure. Restart Your Server: After any changes like these, restarting your Botpress server is a good call. It's like giving it a little nudge to recognize the new setup. Typo Check: Errors can sometimes be as simple as a typo. Make sure your require statement for luxon looks exactly like this: const { DateTime } = require('luxon');. Even a small slip-up here could be the culprit. Botpress Docs for External Modules: Sometimes, Botpress has its own way of dealing with external modules. It might be worth checking out the Botpress documentation or their community forums for any specific steps or nuances. Quick Module Test: To see if this issue is unique to luxon or a broader external module problem, try requiring a different module (like lodash or moment) in the same spot. If those don't work either, the issue might be with how your server handles external modules in general.
f
You don't need this const { DateTime } = require('luxon');
Luxon, Loodash and Axios comes pre-installed in the execute code card
Try without and let us know if it works
Is it taking the date from the Capture information card that catches the date a user said, and then rewriting that to a more user friendly format?
s
... now that you say it, this is most probably the correct solution. I went down the wrong route blindly
f
Happens. It's a pretty common issue here.
There is probably something else wrong with the code, which can be debugged by your ideas
s
Error executing action "inline-card:Calculating Pension Details and Composing User Message.js" in flow:👂 Capturing Information:node:Standard1 [ReferenceError, DateTime is not defined] {"scope":"bot-action","cardId":"card:Calculating Pension Details and Composing User Message","nodeId":"node:Standard1","workflowId":"flow:👂 Capturing Information"}
i cancell the string says require luxon but this is the error
Execute code "Calculating Pension Details and Composing User Message" Error executing action "inline-card:Calculating Pension Details and Composing User Message.js" in flow:👂 Capturing Information:node:Standard1 Entering workflow (flow:Error) [node:On_Error] from (flow:👂 Capturing Information) [node:Standard1]
and this is the error in the page of event debugger
let me know please @fresh-fireman-491 @shy-kangaroo-42622 thank you for yours time
f
What is the purpose of your code? Is it taking the date from the Capture information card that catches the date a user said, and then rewriting that to a more user friendly format?
s
calculate pension is the purpose
so the chatbot use the date of birth to calculate the pension and vary information
Error executing action "inline-card:Calculating Pension Details and Composing Response Message.js" in flow:👂 Capturing Information:node:Standard1 [RangeError, Invalid time value]
now this is the error
f
Okay. In which format do you get the date?
From a capture information card?
s
yes
f
Can you also share with us a reportID?
@square-energy-41150 how to generate a reportID
s
# Sending a Problem Report Here's how to send the Botpress Team a problem report: 1. In the Botpress Cloud Studio, locate the "Help" icon in the bottom left corner of the screen. 2. Click "Report a problem" and follow the steps on the screen. 3. Copy the Report ID to your clipboard and provide it to a member of the Botpress Team on Discord.
message has been deleted