When using OSS storage with Next.js, getBucketInfo() triggers
"ReferenceError: name is not defined" at startup. This happens because
the ali-oss SDK references a variable named `name` internally in its
createRequest function, which conflicts with the global `name` property
in bundled JavaScript environments.
Replacing getBucketInfo() with list({ 'max-keys': 1 }) achieves the same
goal (verifying the bucket is accessible) while avoiding the problematic
code path. The list() method is already used successfully elsewhere in
the OSS adapter.
Fixes #6552
Co-authored-by: octo-patch <octo-patch@github.com>
| Name |
Last commit
|
Last Update |
|---|---|---|
| .claude | Loading commit data... | |
| .codex | Loading commit data... | |
| .github | Loading commit data... | |
| .husky | Loading commit data... | |
| .vscode | Loading commit data... | |
| bin | Loading commit data... | |
| deploy | Loading commit data... | |
| document | Loading commit data... | |
| packages | Loading commit data... | |
| pro @ fa441cde | ||
| projects | Loading commit data... | |
| scripts | Loading commit data... | |
| sdk | Loading commit data... | |
| test | Loading commit data... | |
| .dockerignore | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| .imgbotconfig | Loading commit data... | |
| .npmrc | Loading commit data... | |
| .prettierignore | Loading commit data... | |
| .prettierrc.js | Loading commit data... | |
| AGENTS.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| Makefile | Loading commit data... | |
| README.md | Loading commit data... | |
| README_en.md | Loading commit data... | |
| README_id.md | Loading commit data... | |
| README_ja.md | Loading commit data... | |
| README_th.md | Loading commit data... | |
| README_vi.md | Loading commit data... | |
| SECURITY.md | Loading commit data... | |
| dev.md | Loading commit data... | |
| eslint.config.mjs | Loading commit data... | |
| lint-staged.config.mjs | Loading commit data... | |
| package.json | Loading commit data... | |
| pnpm-lock.yaml | Loading commit data... | |
| pnpm-workspace.yaml | Loading commit data... | |
| tsconfig.json | Loading commit data... | |
| turbo.json | Loading commit data... | |
| vitest.config.mts | Loading commit data... |