flowgen icon indicating copy to clipboard operation
flowgen copied to clipboard

ExportDeclaration

Open blackxored opened this issue 8 years ago • 1 comments

Trying to use this on apollo-client's index.d.ts I'm getting:

Parsing index
Missing node parse ExportDeclaration

And looking at parser.js this is effectively not supported. Are you aware of this issue?

blackxored avatar Apr 04 '17 13:04 blackxored

For those who stumble into this issue, I found that the error "Missing node parse ExportDeclaration" is caused by using module.exports = MyVariable.

My code specifically was:

// index.ts
import MyVariable from './my-variable-file';
module.exports = MyVariable;

This syntax was wrong, but I didn't notice it until after I had attempted to implement my code in another website with server-side rendering. This is the working code:

// index.ts
import MyVariable from './my-variable-file';
export default MyVariable;

ajbogh avatar Jun 25 '18 23:06 ajbogh