CyberSource / CyberSource/cybersource-rest-client-node
Module Not Found in Next.js - AMD module issue and relative paths.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 49
- Forks
- 50
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Description
Next.js tries to load the import as AMD, due to relative path resolution in Webpack to get this library to work you need to add the following to next.config.mjs.
const nextConfig = {
webpack: (config, { isServer }) => {
config.module.rules.push({
test: /\.js$/, // Apply this rule to .js files
include: /node_modules\/cybersource-rest-client/,
parser: {
amd: false, // Disable AMD parsing
},
});
return config;
},
};
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported next.config.mjs webpack workaround and inspect how the package is imported by Next.js, focusing on the relative-path and AMD parsing behavior described in the issue. Reproduce the Module Not Found failure and establish whether the library can work without consumer-side configuration; the issue does not name a repository file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, webpack
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100