N
Neon14mo ago
adverse-sapphire

@neondatabase/api-client@1.10.1 breaking GitHub CI

It looks like this package was just published an hour ago and we're seeing the following error:
file:///opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/neonctl/commands/branches.js:1
import { EndpointType } from '@neondatabase/api-client';
^^^^^^^^^^^^
SyntaxError: Named export 'EndpointType' not found. The requested module '@neondatabase/api-client' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@neondatabase/api-client';
const { EndpointType } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)
Node.js v20.16.0
ERROR: didn't get the branch id
file:///opt/hostedtoolcache/node/20.16.0/x64/lib/node_modules/neonctl/commands/branches.js:1
import { EndpointType } from '@neondatabase/api-client';
^^^^^^^^^^^^
SyntaxError: Named export 'EndpointType' not found. The requested module '@neondatabase/api-client' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@neondatabase/api-client';
const { EndpointType } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)
Node.js v20.16.0
ERROR: didn't get the branch id
We are using the neondatabase/create-branch-action@v5 action which in turn uses neonctl@1.34.0 and that uses @neondatabase/api-client@^1.10.0.
2 Replies
adverse-sapphire
adverse-sapphireOP14mo ago
If you go to https://www.npmjs.com/package/@neondatabase/api-client/v/1.10.1?activeTab=code, then drill into the dist directory, this release is missing the api.gen.js file (and type definitions)
npm
@neondatabase/api-client
Wrapper for Neon API. Latest version: 1.10.1, last published: an hour ago. Start using @neondatabase/api-client in your project by running npm i @neondatabase/api-client. There are 2 other projects in the npm registry using @neondatabase/api-client.
adverse-sapphire
adverse-sapphireOP14mo ago
1.10.2 was published and this issue has been fixed

Did you find this page helpful?