-
-
Notifications
You must be signed in to change notification settings - Fork 22
Description
./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);
console.log(data);
} catch (error) {
// catch an error.
console.log(error);
}