@westyx-nexus/sdk-nodejs package is hosted on the GitLab npm Package Registry. It is public - no token is required to install.
1. Configure npm to look at the registry
Add (or merge) the following to your project’s.npmrc:
Commit the
.npmrc to source control. It contains no credentials - every developer on the team automatically picks up the right registry.2. Install the package
Requirements
- Node.js 18.0 or newer (LTS). Earlier versions are not tested and will likely fail on global
fetch-style helpers and ES2022+ features used internally. - TypeScript users: any version supporting ES2022 target is fine. Type definitions ship in the package.
Importing
The package exposes a CommonJS build underdist/. Both import (ES modules) and require (CommonJS) work:
Verifying connectivity
Before writing any code, confirm your endpoint and API key work with a plaincurl:
configs, secrets, and flags. An HTTP 401 means the key is wrong; HTTP 404 means the slug is wrong.
To watch the live SSE stream:
event:resync arrive within a second. Press Ctrl+C to stop.
Troubleshooting
Could not resolve '@westyx-nexus/sdk-nodejs'- your.npmrcis not picked up. Confirm it’s at the project root next topackage.json, and checknpm config get registry @westyx-nexus.401 Unauthorizedwhen runningnpm install- the registry may be configured with an old path that’s no longer valid. Switch to the numeric-ID variant above.ERR_REQUIRE_ESM- you tried torequire()an ESM-only build. The SDK ships CJS; if you see this, double-check the import path.
