You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Two issues on Windows - reflect-metadata missing and client app crash #185
webpack complained that it couldn't find reflect-metadata. I removed the import of reflect-metadata and then webpack completed without errors. I have no idea if this is correct fix.
The counter's increment button isn't working. Turns out the issue is that precache from server is displaying pages, gives illusion of working, but client app crashes. This can be proven if you remove precache from tag and run. "Loading..." appears but the webpages are never shown. I have no idea what's broken. Maybe related to first issue?
Adding the import 'reflect-metadata' to boot-client.ts resolved the issue for me but only when compiling and running from VS2015. If I pop out to a cmd prompt and run > dotnet run I still get the following error. This is also what breaks the counter page.
@tsmith-sdm I presume you meant adding the "reflect-metadata" to the "dependencies" under package.json, as @BradRem suggested? My boot-client.ts was correct out of the box, and I didn't need to add anything to it. I did have to do what @BradRem suggested, and as you stated, it only works when run from Visual Studio, and continues to fail when run from the command line.
I'm pretty sure this is the same as #239 (and also mentioned in #82). reflect-metadata doesn't get installed properly on Windows if you're on NPM 2.x. You need NPM 3.x (as per docs).
If anyone's definitely on NPM 3.x (both when running from command line, and from VS, which has to be set up differently) and still gets this, please re-open!
Activity
BradRem commentedon Jul 15, 2016
I was having both these issues, but after I added "reflect-metadata" to the "dependencies" under package.json, both issues were resolved.
tsmith-sdm commentedon Jul 24, 2016
Adding the import 'reflect-metadata' to boot-client.ts resolved the issue for me but only when compiling and running from VS2015. If I pop out to a cmd prompt and run > dotnet run I still get the following error. This is also what breaks the counter page.
Error: Cannot find module "reflect-metadata"
/dist/main.js?v=NRyF4xz17BbBUvE2kfFqr5de-qY0BPjRSvLL1hWLrAk:1
boot-client.ts:
justinhixson commentedon Jul 27, 2016
@tsmith-sdm I presume you meant adding the "reflect-metadata" to the "dependencies" under package.json, as @BradRem suggested? My boot-client.ts was correct out of the box, and I didn't need to add anything to it. I did have to do what @BradRem suggested, and as you stated, it only works when run from Visual Studio, and continues to fail when run from the command line.
SteveSandersonMS commentedon Aug 16, 2016
I'm pretty sure this is the same as #239 (and also mentioned in #82).
reflect-metadatadoesn't get installed properly on Windows if you're on NPM 2.x. You need NPM 3.x (as per docs).Note that just having installed NPM 3.x on your Windows machine doesn't mean that Visual Studio will use it, since VS has its own private copy of Node/NPM that it uses. Getting VS to use NPM 3.x is a bit more involved - see the "A FIX" heading on http://www.hanselman.com/blog/VisualStudio2015FixingDependenciesNpmNotInstalledFromFseventsWithNodeOnWindows.aspx
If anyone's definitely on NPM 3.x (both when running from command line, and from VS, which has to be set up differently) and still gets this, please re-open!