Skip to content
This repository has been 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
CraftyFella opened this issue Sep 1, 2016 · 1 comment

Comments

@CraftyFella
Copy link

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?

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented Sep 1, 2016

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants