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

Using make with custom namespaces throws error #176

Open
ricsmania opened this issue Oct 29, 2019 · 0 comments
Open

Using make with custom namespaces throws error #176

ricsmania opened this issue Oct 29, 2019 · 0 comments

Comments

@ricsmania
Copy link

When I try to run the following code it throws an error:

import { make } from '@creditkarma/thrift-typescript';

make(`namespace java com.my.service
namespace js thrift

struct Response {
  1: string id  
}

service TestService {
  Response getState(1: Response request)
}`);

The error is:

TypeError: Cannot read property 'exports' of undefined
at Object.make (/Users/ricardo/projects/jimdo/thrift-cli/node_modules/@creditkarma/thrift-typescript/src/main/index.ts:76:18)

This seems to be because the make method looks for the __ROOT_NAMESPACE__ namespace, but that doesn't exist when I use custom namespaces.

This started after I upgraded to version 3.7.6. I was using version 3.5.0 before and it worked.

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