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

URL is not a constructor #44

Closed
sammypanda opened this issue Jul 27, 2021 · 5 comments
Closed

URL is not a constructor #44

sammypanda opened this issue Jul 27, 2021 · 5 comments

Comments

@sammypanda
Copy link

Hiya!

(Vue/NuxtJS)
I'm able to get an output by console logging the response, but it comes with this error:
image

I'm currently using the amazon-sp-api through a js file that's imported to the Vue instance through Nuxt plugins.
I'm not sure if it's because of that way im using it, and maybe Vue is doing something to it, or if i've made a silly mistake in where i put it (but i've already had some issues like with the env vars not being available before the plugin is run).

@amz-tools
Copy link
Owner

Hi @sammypanda,

there seems to be a problem with the require('url') syntax in the request.js file. Maybe this stackoverflow entry might help.

@sammypanda
Copy link
Author

Thank you @amz-tools ✨ I did this one (removing the require statement) as it's the advice that aligned best with my node version
image

but it ended up giving me CORS/Bad URI
image

@amz-tools
Copy link
Owner

@sammypanda This is probably an issue with how you are using the package (importing it to Vue via Nuxtjs). I'm not too familiar with Vue and Nuxtjs but I would guess you will have to customize quite some things within the package to make it work properly for your use case.
Maybe someone else is around who has already tried something similiar and can help out...

@sammypanda
Copy link
Author

Thank you (^^)

@amz-tools
Copy link
Owner

@sammypanda, did you happen to get it working in your setup?

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

No branches or pull requests

2 participants