Describe the Bug
A clear and concise description of what the bug is.
I get an error telling me to polyfill my fucking server because something in this pacakage wont run with es5-6 and it requires es5-6. I run no business logic, no code literally just importing this breaks my server. Everything else runs fine.
To Reproduce
A quick guide how to reproduce the bug.
You can paste here code snippets or even better, provide a link to the repository with minimal reproducible code example.
Import the package
Expected Behavior
A clear and concise description of what you expected to happen.
Nothing, no code is run its just fucking bricked from import
Logs
If applicable, add some console logs to help explain your problem.
You can paste the errors with stack trace that were printed when the error occured.
[INFO] 15:53:29 Restarting: /Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/src/main.ts has been modified
Error: Looks like you've forgot to provide experimental metadata API polyfill. Please read the installation instruction for more details.
at Object.ensureReflectMetadataExists (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/metadata/utils.js:41:15)
at new MetadataStorage (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/metadata/metadata-storage.js:26:17)
at Object.getMetadataStorage (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/metadata/getMetadataStorage.js:5:87)
at Resolver.target (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/decorators/Resolver.js:19:30)
at __decorate (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/src/domain/user/user.resolver.ts:5:95)
at /Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/src/domain/user/user.resolver.ts:10:26
at Object.
at Module._compile (internal/modules/cjs/loader.js:734:30)
at Module._compile (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/source-map-support/source-map-support.js:547:25)
at Module.m._compile (/private/var/folders/g_/k1bttrxs3hd5h7py17b7wt7r0000gn/T/ts-node-dev-hook-39679732610653184.js:59:25)
at Module._extensions..js (internal/modules/cjs/loader.js:745:10)
at require.extensions.(anonymous function) (/private/var/folders/g_/k1bttrxs3hd5h7py17b7wt7r0000gn/T/ts-node-dev-hook-39679732610653184.js:61:14)
at Object.nodeDevHook [as .ts] (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/ts-node-dev/lib/hook.js:61:7)
at Module.load (internal/modules/cjs/loader.js:626:32)
at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
at Function.Module._load (internal/modules/cjs/loader.js:558:3)
Using ts-node version 8.10.2, typescript version 3.9.5
Error: Looks like you've forgot to provide experimental metadata API polyfill. Please read the installation instruction for more details.
at Object.ensureReflectMetadataExists (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/metadata/utils.js:41:15)
at new MetadataStorage (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/metadata/metadata-storage.js:26:17)
at Object.getMetadataStorage (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/metadata/getMetadataStorage.js:5:87)
at Resolver.target (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/type-graphql/dist/decorators/Resolver.js:19:30)
at __decorate (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/src/domain/user/user.resolver.ts:5:95)
at /Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/src/domain/user/user.resolver.ts:10:26
at Object.
at Module._compile (internal/modules/cjs/loader.js:734:30)
at Module._compile (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/source-map-support/source-map-support.js:547:25)
at Module.m._compile (/private/var/folders/g_/k1bttrxs3hd5h7py17b7wt7r0000gn/T/ts-node-dev-hook-39679732610653184.js:59:25)
at Module._extensions..js (internal/modules/cjs/loader.js:745:10)
at require.extensions.(anonymous function) (/private/var/folders/g_/k1bttrxs3hd5h7py17b7wt7r0000gn/T/ts-node-dev-hook-39679732610653184.js:61:14)
at Object.nodeDevHook [as .ts] (/Users/benjamin/PycharmProjects/VscodeProjects/dinasite/backend/node_modules/ts-node-dev/lib/hook.js:61:7)
at Module.load (internal/modules/cjs/loader.js:626:32)
at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
at Function.Module._load (internal/modules/cjs/loader.js:558:3)
[ERROR] 15:53:33 Error: Looks like you've forgot to provide experimental metadata API polyfill. Please read the installation instruction for more details.
Environment (please complete the following information):
Additional Context
Add any other context about the problem here.
I get an error telling me to polyfill my fucking server because something in this pacakage wont run with es5-6 and it requires es5-6.
You need to install fucking reflect-metadata package as described in the fucking installation docs:
https://typegraphql.com/docs/installation.html
This shit also describes that you need to configure your TS to es2018 and run on the Node.js LTS (10.3+, 12+) that supports this es target.
works like fucking described
Most helpful comment
You need to install fucking
reflect-metadatapackage as described in the fucking installation docs:https://typegraphql.com/docs/installation.html
This shit also describes that you need to configure your TS to
es2018and run on the Node.js LTS (10.3+, 12+) that supports this es target.