Nuno
WWasp
•Created by Nuno on 2/6/2025 in #đŸ™‹questions
OpenSaaS serverside actions/queries problem
Hi, I am using wasp version 0.16.0 and the openSaaS tempalte on linux and I am experiencing some troubles using queries/actions on the server side.
To reproduce:
-create a new folder in src (let say /error.
-make @src/error/queries.js file with this code;
-create another file; @src/error/queries2.js with this code:
Define the queries in the main.wasp file;
Now it throws an error:
[ Server!] code: 'ERR_MODULE_NOT_FOUND',
[ Server!] url: 'file:///home/nuno120/Documents/BELLEN-AIPERSONAL/test2/app/.wasp/out/sdk/wasp/dist/ext-src/payment/plans'
[ Server!] }
[ Server!] Node.js v20.17.0
[ Server ] [nodemon] app crashed - waiting for file changes before starting...
When i change the import of the task in queries2.js to this:
import { getAllTasks } from "wasp/ext-src/error/queries";
it works again btw!
But not with the wasp/server/operations. Anyone knows why/how to fix? Also I don't understand why it throws an error in the payment/plants file and it get's fixed when I change the import in another file....
19 replies