Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier. #922

Open
juninhodeluca opened this issue Dec 14, 2024 · 0 comments

Comments

@juninhodeluca
Copy link

juninhodeluca commented Dec 14, 2024

After last update I'm getting the following error when building

Step 9/23 : RUN pnpm build
 ---> Running in b782a7fbad46

> [email protected] build /app
> tsc

node_modules/@livekit/protocol/dist/index.d.mts(11473,1): error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
 ELIFECYCLE  Command failed with exit code 2.
Cleaning up...
 - No resources found
build [voice-assistants] failed: docker build failure: The command '/bin/sh -c pnpm build' returned a non-zero code: 2. Please fix the Dockerfile and try again..

my package.json deps

"dependencies": {
    "@livekit/agents": "^0.5.1",
    "@livekit/agents-plugin-openai": "^0.7.1",
    "@livekit/agents-plugin-silero": "^0.5.0",
    "@livekit/rtc-node": "^0.12.1",
    "axios": "^1.7.8",
    "dotenv": "^16.4.5",
    "form-data": "^4.0.1",
    "livekit-server-sdk": "^2.9.3",
    "lodash": "^4.17.21",
    "mongoose": "^8.8.3",
    "uuid": "^11.0.2",
    "zod": "^3.23.8"
  }

The error origin is at node_modules/@livekit/protocol/dist/index.d.mts(11473,1), as present in log.
Specifically in the index.d.mts file (line 11473)

const version = "1.29.3";

should be

export const version = "1.29.3";

or may could be also removed, since the file index.cjs at line 6011 there are also a version constant

// line 6011
const version = "1.29.3";

which is exported at line 6260

// line 6260
exports.version = version;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant