-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Module not found: Can't resolve 'ApiClient' #25
Comments
same issue migrating to a react component. |
@KashyapAmanSingh @hypericon Did you end up finding a solution to this? Running into the same problem. |
Unfortunately I had do switch to PHP: for sure is a problem connected to how the headers are created and sent.The other issue is it’s hard to debug wether the request is well formatted before you create the call to the API :(Il giorno 22 mar 2024, alle ore 12:21, Robbert ***@***.***> ha scritto:
@KashyapAmanSingh @hypericon Did you end up finding a solution to this? Running into the same problem.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks. Do you think this is a problem with this specific package or the Amazon NodeJS SDK in general? |
In my case I am quite sure the porting from JAVA or PHP to typescript and react even if code-correct, have some problem in the headers.
Since the PHP library have worked instantly…
So I believe is connected to my code, not to the PAAPI...
… Il giorno 22 mar 2024, alle ore 13:12, Robbert ***@***.***> ha scritto:
Unfortunately I had do switch to PHP: for sure is a problem connected to how the headers are created and sent.The other issue is it’s hard to debug wether the request is well formatted before you create the call to the API :(Il giorno 22 mar 2024, alle ore 12:21, Robbert @.> ha scritto: @KashyapAmanSingh <https://github.com/KashyapAmanSingh> @hypericon <https://github.com/hypericon> Did you end up finding a solution to this? Running into the same problem. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>
Thanks. Do you think this is a problem with this specific package or the Amazon NodeJS SDK in general?
—
Reply to this email directly, view it on GitHub <#25 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABB6M5BLJWXT4CAVOHZG7X3YZQNZNAVCNFSM6AAAAABDB2GLNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUHE2DQNJTHA>.
You are receiving this because you were mentioned.
|
./node_modules/amazon-paapi/SDK/src/index.js
Module not found: Can't resolve 'ApiClient'
Did you mean './ApiClient'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules, C:\Users\arbal\OneDrive\Desktop\iitm\shopping-web-app).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/amazon-paapi/app.js
./src/app/api/amazonData/route.tsx
these are my codes
const amazonPaapi = require('amazon-paapi');
try {
const data = await amazonPaapi.SearchItems(commonParameters, requestParameters);
} catch (error) {
// catch an error.
console.log(error);
}
The text was updated successfully, but these errors were encountered: