timjroberts / cucumber-js-tsflow

Provides 'specflow' like bindings for Cucumber.js in TypeScript 1.7+.
MIT License
133 stars 34 forks source link

Property 'decorate' does not exist on type 'typeof Reflect'. (2339) #21

Closed neekers closed 5 years ago

neekers commented 7 years ago

Trying to set this whole thing up using Angular-CLI and protractor and cucumber and TypeScript.

I have my steps file there and it seems to be looking at it, but now I get this error

Property 'decorate' does not exist on type 'typeof Reflect'. (2339)

It's a very simple test. I get the error 3 times. Seems to correlate with the method decorators

protractor-cucumber-framework@1.0.1 protractor@5.1.1 @angular@2.4.9 ts-node@2.1.0 cucumber@1.3.1 typescript@2.0.10

harshabonthu commented 7 years ago

@neekers I'm getting the same error with Angular cli. Were you able to find any solution / work around? Thanks.

jonathanburrows commented 7 years ago

@harshabonthu I was getting the same error. Was working for ng build, but not ng e2e. I believe protractor does not include the polyfill correctly. Was able to work around by adding import 'reflect-metadata'; to each file that had a reference to Reflect.

vitalics commented 6 years ago

@neekers probably typescript cannot be found Reflect namespace. Try install reflect-metadata library. Just write npm i -S reflect-metadata and try again

iliyaZelenko commented 5 years ago

I was helped by the installation package for babel: @babel/preset-typescript.

Taewa commented 3 years ago

Hi @iliyaZelenko Could you tell me how you applied babel with cucumber-ts-flow?