Repository navigation
Description
Hi,
I have this error after migrating to webpack.8 :
Uncaught reflect-metadata shim is required when using class decoratorscheckReflect
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Window 7 - Versions. Please run
ng --version. If there's nothing outputted, please run
in a Terminal:node --versionand paste the result here:
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.3.1
os: win32 x64 - Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
It's worked fine with angular-cli@webpack.2. After I upgrated to angular-cli@webpack.8. I got the errors below. - The log given by the failure. Normally this include a stack trace and some
more information.
decorators.js:173Uncaught reflect-metadata shim is required when using class decoratorscheckReflect @ decorators.js:173(anonymous function) @ decorators.js:175__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ decorators.js:9__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ opaque_token.js:9__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ di.js:16__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ metadata.js:9__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ index.js:17__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ lexer.js:9__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ i18n_parser.js:21__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ extractor_merger.js:24__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ message_bundle.js:22__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ main.bundle.js:76909__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ index.js:17__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ index.js:21__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ simulation.routing.ts:7__webpack_require__ @ bootstrap b71fb3d…:52(anonymous function) @ main.ts:3(anonymous function) @ webcomponents-lite.min.js:12
client?93b6:71 [WDS] Disconnected!sock.onclose @ client?93b6:71EventTarget.dispatchEvent @ eventtarget.js:51(anonymous function) @ main.js:356
Activity
kkuriata commentedon Sep 7, 2016
Getting exactly the same error.
deebloo commentedon Sep 7, 2016
make sure you import the polyfills.ts file in your main.ts file.

spongessuck commentedon Sep 15, 2016
Shouldn't webpack produce
polyfills.bundle.jsfile based onpolyfills.tsthat gets injected into the page automatically?EDIT:
Nevermind, it seems like #1633 changed this.
tonymedrano commentedon Nov 16, 2016
Hi there, my experimental solution in Windows for now is:
-Got to directory: C:\Users"Your User"\AppData\Roaming\npm\node_modules\angular-cli
It´s working for me and apply for any platform if you can access the final path as above.
Hope this help.
sergio8016 commentedon Oct 24, 2017
Worked on MAC too. Thank you Tony. But i just installed it on the project directory only.
gajerajatin31 commentedon Dec 5, 2017
Thanks @tonymedrano it's work....
Dipesh-Jayswal commentedon Dec 8, 2017
Thank @tonymedrano
angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.