Module '"wasp/server/operations"' has no exported member 'scrapeArticles'.
Hey,
I'm been having some trouble trying to resolve this bug related to a custom action that I'm trying to implement. I'm using the open Saas framework.
Here's the line that giving me touble:
with error "Module '"wasp/server/operations"' has no exported member 'scrapeArticles'."
I get this in a compenent .tsx file.
Naturally, it seems like an error with setting up the
So going to my main.wasp, I have:
action scrapeArticles {
fn: import { scrapeArticles } from "@src/server/actions.js"
entities: []
}
the docs say
and rounding it off, in my
export const scrapeArticles = async () => {
try {
const response = await axios.post('http://127.0.0.1:8000/scrape_news');
return response.data;
} catch (error) {
console.error('Error scraping articles:', error);
throw error;
}
};
I've tried
Thanks!
I'm been having some trouble trying to resolve this bug related to a custom action that I'm trying to implement. I'm using the open Saas framework.
Here's the line that giving me touble:
import { scrapeArticles } from 'wasp/server/operations';with error "Module '"wasp/server/operations"' has no exported member 'scrapeArticles'."
I get this in a compenent .tsx file.
Naturally, it seems like an error with setting up the
scrapeArticles actions.So going to my main.wasp, I have:
action scrapeArticles {
fn: import { scrapeArticles } from "@src/server/actions.js"
entities: []
}
the docs say
@src/actions.js, but the directory I have here is correct for my app.and rounding it off, in my
actions.ts, I write:export const scrapeArticles = async () => {
try {
const response = await axios.post('http://127.0.0.1:8000/scrape_news');
return response.data;
} catch (error) {
console.error('Error scraping articles:', error);
throw error;
}
};
I've tried
- changing the actions.js => actions.ts in the wasp.main file
- import {scrapeArticles} in actions.ts as the docs might suggest
- resetting the typescript in the file that I'm getting the error in
Thanks!