Skip to content

Fix modules not found when running dist#8

Open
alancuriel wants to merge 2 commits into
marceloclp:v2from
alancuriel:v2
Open

Fix modules not found when running dist#8
alancuriel wants to merge 2 commits into
marceloclp:v2from
alancuriel:v2

Conversation

@alancuriel

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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