Closed Akshitjariwala closed 2 years ago
Not package related problem
@Akshitjariwala, Did you ever solve this? I was searching how to get this running and I thought I would put what I had here.
I'm using firebase functions. In the functions
directory, I ran
npm i amazon-buddy
My code is
import * as functions from "firebase-functions";
import * as amazonbuddy from "amazon-buddy";
export const searchForProducts =
functions.https.onCall(async (data, context) => {
const options = {
keyword: "vacuum cleaner",
};
const output = await amazonbuddy.products(options);
console.log(output);
return output;
});
Try deleting the node_modules folder and do the 'npm install' once again to install and load all the dependencies from scratch. That worked for me.
I am not able to load the 'amazon-buddy' module in my code and it is always giving 'Could not find module 'amazon-buddy''. Even though i ran the npm command mentioned on the site to load the package. Could you please help ?