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

Typescript build errors #103

Open
moarwick opened this issue Jan 31, 2022 · 2 comments
Open

Typescript build errors #103

moarwick opened this issue Jan 31, 2022 · 2 comments

Comments

@moarwick
Copy link

Description

We have a Typescript project, built using Webpack + ts-loader. In the client SPA, I've imported Typesense the traditional way import * as Typesense from 'typesense' which seems to work well (typings come through). The code builds and runs fine, but at build time I'm getting the following errors, so our CI/CD pipeline stops :(

ERROR in /app/node_modules/typesense/lib/Typesense/Documents.d.ts
2:12-13
[tsl] ERROR in /app/node_modules/typesense/lib/Typesense/Documents.d.ts(2,13)
      TS1005: '=' expected.
ts-loader-default_3ef1a0ebb55d0532

ERROR in /app/node_modules/typesense/lib/Typesense/Documents.d.ts
2:32-36
[tsl] ERROR in /app/node_modules/typesense/lib/Typesense/Documents.d.ts(2,33)
      TS1005: ';' expected.
ts-loader-default_3ef1a0ebb55d0532

Expected Behavior

Should transpile without errors. Is there a different way I should be importing the browser client?

Metadata

Typsense Version:
"typesense": "^1.1.2"
"@babel/runtime": "^7.16.7" <-- we aren't running Babel, is it needed?

OS:
OSX BigSur 11.6

@jasonbosco
Copy link
Member

@dcantu476 Any thoughts on this?

@dcantu476
Copy link
Contributor

@jasonbosco @moarwick

The first place I would check is to see what is different between the CI pipeline and your regular build steps. Maybe the CI pipeline is using a different version of typescript? Other than that, the formatting of the files is correct from what I can see.

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

3 participants