andywer / typed-emitter

🔩 Type-safe event emitter interface for TypeScript
MIT License
268 stars 24 forks source link

This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' #14

Open heol-files opened 3 years ago

heol-files commented 3 years ago

When using pkg to pack a node application I get the following error, how do I solve this?

[debug] Content of %1 is added to queue
  %1: C:\Users\henri\git\xot_client\nodejs\xot_proxy\node_modules\typed-emitter\index.d.ts
> Error! This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (1:7)
  C:\Users\henri\git\xot_client\nodejs\xot_proxy\node_modules\typed-emitter\index.d.ts
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! xot-proxy@0.1.4 package:win64: `pkg --target win-x64 --debug --out-path packages .`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the xot-proxy@0.1.4 package:win64 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
andywer commented 3 years ago

Hey @heol-files! I think this is a result of #12…

Can you try to add an empty index.js file to node_modules/typed-emitter/ and drop the main field from node_modules/typed-emitter/package.json?