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.

Running musicstore angular2 sample causes exception - Cannot find module JavaScriptServices\samples\angular\MusicStore\wwwroot\ng-app\boot-server #290

Closed

Description

@CraftyFella

Hi,

I followed the instructions on how to get the sample application working I.e.

  • Clone this repo
  • Change directory to the same you want to run (e.g., cd samples/angular/MusicStore)
  • Restore dependencies (run dotnet restore and npm install)
  • Run the application (dotnet run)
  • Browse to http://localhost:5000

But I end up with the following exception:

An unhandled exception occurred while processing the request.

Exception: Call to Node module failed with error: Error: Cannot find module 'C:\code\github\JavaScriptServices\samples\angular\MusicStore\wwwroot\ng-app\boot-server'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at findBootModule (C:\code\github\JavaScriptServices\samples\angular\MusicStore\node_modules\aspnet-prerendering\Prerendering.js:71:24)
at findBootFunc (C:\code\github\JavaScriptServices\samples\angular\MusicStore\node_modules\aspnet-prerendering\Prerendering.js:76:5)
at renderToString (C:\code\github\JavaScriptServices\samples\angular\MusicStore\node_modules\aspnet-prerendering\Prerendering.js:9:5)
at module.exports.renderToString (C:\Users\dave_\AppData\Local\Temp\tmpF280.tmp:11:46)
at C:\Users\dave_\AppData\Local\Temp\tmpF290.tmp:110:19
at IncomingMessage.<anonymous> (C:\Users\dave_\AppData\Local\Temp\tmpF290.tmp:130:35)
MoveNext in HttpNodeInstance.cs, line 71

Any ideas what I'm doing wrong?

Activity

  1. SteveSandersonMS commented on Sep 1, 2016

    @SteveSandersonMS
    Member

    Sorry, there's a setup step missing from the docs. This one particular sample is a bit old-fashioned and still relies on you running gulp to build it (rather than using Webpack dev middleware as in all the other samples).

    So make sure you have Gulp installed globally (via npm install -g gulp) then run gulp from the root directory of the MusicStore sample. Then run dotnet run.

    I've updated the docs to reflect this!

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