Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix modules not found when running dist #8

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from

Conversation

alancuriel
Copy link
Contributor

I believe this fixes it. Definitely try it out.

But I also get a runtime error when I run a query. It seems to fail at parsing the json response from the constructed url even though its seems correct. I tried querying product recipe for item '9213'

@alancuriel
Copy link
Contributor Author

Fixed the json parse error but there is an error when building the recipes for the product '9213' . Seems to not be able to handle multiple recipes for a product

@alancuriel
Copy link
Contributor Author

import pkg from './dist/src/index.js';
const {Query, QueryModes} = pkg;



const scrape = async (id, type) => {

    const recipes = await Query( QueryModes.PatternProduct, id);

    console.log(recipes.data);
};
scrape('9213');

error happens when running this code

@marceloclp
Copy link
Owner

Just letting you know that I am aware of this PR.

I don't think this is the correct solution and need to set up this repo environment locally again as I have changed computers. I will take a look more carefully on the weekend.

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants