Skip to content

Module not found: Can't resolve 'ApiClient' #25

@KashyapAmanSingh

Description

@KashyapAmanSingh

./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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions