Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
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

Description

@BSalita

There's two issues with windows.

  1. 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.

  2. 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?

Works fine using Ubuntu 16.04.

Activity

  1. BradRem commented on Jul 15, 2016

    @BradRem

    I was having both these issues, but after I added "reflect-metadata" to the "dependencies" under package.json, both issues were resolved.

  2. tsmith-sdm commented on Jul 24, 2016

    @tsmith-sdm

    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:

    require('zone.js');
    import 'bootstrap';
    import 'reflect-metadata';
    import './styles/site.css';
    
  3. justinhixson commented on Jul 27, 2016

    @justinhixson

    @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.

  4. SteveSandersonMS commented on Aug 16, 2016

    @SteveSandersonMS
    Member

    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).

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions