Arco CLI Auth
raw JSON → 1.0.3 verified Sat Apr 25 auth: no javascript
Auth module for Arco CLI, providing authentication functionality for Arco design system command-line tools. Version 1.0.3 is the current stable release with no known update cadence. It is a minimal package likely used internally within the Arco ecosystem, and not intended for general use. Differentiator: specific to Arco CLI workflows, not a general-purpose auth library.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module not supported ↓
cause Using CommonJS require() on an ESM-only package.
fix
Change to import statement or set type: module in package.json.
error TypeError: auth is not a function ↓
cause Incorrect import syntax, likely using named import when only default export exists.
fix
Use
import auth from 'arco-cli-auth' instead of import { auth } from .... Warnings
gotcha Package is designed for internal Arco CLI use only. Public API may change without notice. ↓
fix Do not depend on this package directly outside of Arco CLI.
deprecated The package has no recent updates; consider it unmaintained for external use. ↓
fix Use a standard authentication library like OAuth2 client.
breaking Version 1.0.0 changed from CommonJS to ESM-only. Requiring via require() may fail. ↓
fix Use import syntax or enable ESM in your project.
Install
npm install arco-cli-auth yarn add arco-cli-auth pnpm add arco-cli-auth Imports
- default wrong
import { auth } from 'arco-cli-auth'correctimport auth from 'arco-cli-auth' - login wrong
const login = require('arco-cli-auth').logincorrectimport { login } from 'arco-cli-auth' - logout wrong
import logout from 'arco-cli-auth'correctimport { logout } from 'arco-cli-auth'
Quickstart
import { login, logout } from 'arco-cli-auth';
async function main() {
const token = await login({ clientId: 'my-app', redirectUri: 'http://localhost:3000/callback' });
console.log('Token:', token);
// Use token for API calls
await logout(token);
}
main().catch(console.error);