amazon-creators-api 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -4
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Amazon Creators API Node.js SDK
2
2
 
3
- ![https://github.com/ryanschiang/amazon-creators-api](https://img.shields.io/badge/github-repo-blue?logo=github) ![https://github.com/ryanschiang/amazon-creators-api/LICENSE.txt](https://img.shields.io/github/license/ryanschiang/amazon-creators-api) ![https://github.com/ryanschiang/amazon-creators-api](https://img.shields.io/github/package-json/v/ryanschiang/amazon-creators-api) ![https://npmjs.com/package/amazon-creators-api](https://img.shields.io/npm/v/amazon-creators-api)
3
+ ![https://github.com/ryanschiang/amazon-creators-api](https://img.shields.io/badge/github-repo-blue?logo=github) ![https://github.com/ryanschiang/amazon-creators-api/blob/main/LICENSE.txt](https://img.shields.io/github/license/ryanschiang/amazon-creators-api) ![https://github.com/ryanschiang/amazon-creators-api](https://img.shields.io/github/package-json/v/ryanschiang/amazon-creators-api) ![https://npmjs.com/package/amazon-creators-api](https://img.shields.io/npm/v/amazon-creators-api)
4
4
 
5
5
  This is an **unofficial TypeScript wrapper** for the [Amazon Creators API Node.js SDK](https://affiliate-program.amazon.com/creatorsapi/docs/en-us/get-started/using-sdk).
6
6
 
@@ -22,7 +22,7 @@ npm install amazon-creators-api
22
22
 
23
23
  ## Usage
24
24
 
25
- See the [examples](examples) directory for usage examples.
25
+ See the [examples](https://github.com/ryanschiang/amazon-creators-api/tree/main/examples) directory for usage examples.
26
26
 
27
27
  ### Get Items
28
28
 
@@ -89,14 +89,23 @@ async function getItems(): Promise<void> {
89
89
  }
90
90
  ```
91
91
 
92
+ ## Troubleshooting
93
+
94
+ ### "Browser-only version of superagent could not find XHR"
95
+
96
+ This SDK is for **Node.js** and uses the Node build of `superagent`. The package is configured so bundlers use the Node build. If you still see this error (e.g. with a custom bundler or SSR setup), alias `superagent` to the Node entry in your bundler, for example:
97
+
98
+ - **Webpack**: `resolve.alias: { superagent: require.resolve('superagent/lib/node/index.js') }`
99
+ - **Vite**: `resolve.alias: { superagent: 'superagent/lib/node/index.js' }`
100
+
92
101
  ## Contributing
93
102
 
94
103
  Contributions are welcome! Please open an [issue](https://github.com/ryanschiang/amazon-creators-api/issues) or submit a pull request.
95
104
 
96
105
  ## License
97
106
 
98
- Licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.
107
+ Licensed under the Apache License, Version 2.0. See the [https://github.com/ryanschiang/amazon-creators-api/blob/main/LICENSE.txt](LICENSE) file for details.
99
108
 
100
- Original authorship belongs to Amazon.com, Inc. or its affiliates. See the [NOTICE](NOTICE.txt) file for details.
109
+ Original authorship belongs to Amazon.com, Inc. or its affiliates. See the [https://github.com/ryanschiang/amazon-creators-api/blob/main/NOTICE.txt](NOTICE.txt) file for details.
101
110
 
102
111
  Modifications copyright (c) 2026 Ryan Chiang.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amazon-creators-api",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Amazon Creators API NodeJS SDK",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,8 @@
30
30
  "api-client"
31
31
  ],
32
32
  "browser": {
33
- "fs": false
33
+ "fs": false,
34
+ "superagent": "superagent/lib/node/index.js"
34
35
  },
35
36
  "dependencies": {
36
37
  "superagent": "^5.3.0"