Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge commit '897c924b5b162ec8eefb39c4a2c03e5a420f672b' into dotnet3-…
Browse files Browse the repository at this point in the history
…migration/dev-dotnet3
  • Loading branch information
mvelosop committed Nov 23, 2019
2 parents b8c6648 + 897c924 commit fb6c66f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Web/WebSPA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,30 @@ The SPA application is using a newer version of NPM than the one provided by Vis

NPM is bundled with NODE.JS. Installing NPM and NODE is pretty straightforward by using the installer package available at https://nodejs.org/en/

<img src="../../../../img/spa/installing_npm_node.png">
<img src="../../../img/spa/installing_npm_node.png">

You can install the version "Recommended For Most Users" of Node which at the moment of this writing was v6.9.3 LTS and comes with a newer version of NPM.
You can see your initial NPM version and the installed NPM version with the command
<b>npm -v</b>, as shown below.
<p>
<img src="../../../../img/spa/npm-versions-powershell.png">
<img src="../../../img/spa/npm-versions-powershell.png">

### Set NPM path into Visual Studio
NPM will be usually installed under this path:
<b>C:\Program Files (x86)\nodejs</b>.
You need to update that path in Visual Studio 2015 under the "External Web Tools" location paths, as shown below:
<p>
<img src="../../../../img/spa/vs-tools-path-custom-node.png">
<img src="../../../img/spa/vs-tools-path-custom-node.png">

### Build the SPA app with NPM
Finally, you need to build the SPA app (TypeScript and Angular based client app) with NPM.
* Open a command-prompt window and move to the root of the SPA application (src\Web\WebSPA\eShopOnContainers.WebSPA)
* Run the command <b>npm run build:prod</b> as shown below:
<p>
<img src="../../../../img/spa/npm-run-build.png">
<img src="../../../img/spa/npm-run-build.png">

If you get an error like <b>"Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x"</b>, then run the command <b>npm rebuild node-sass</b> as in the following screenshot:
<img src="../../../../img/spa/npm-rebuild-node-sass.png">
<img src="../../../img/spa/npm-rebuild-node-sass.png">
Then, run again the <b>npm run build:prod</b> command that should finish with no errors.

### Build/create the Docker images
Expand All @@ -41,6 +42,6 @@ Deploy/run the Docker containers with <b>"docker-compose up"</b> as explained in
### Test the SPA web application

Test the SPA app by running the following URL in a browser:
<b> http://TBD</b>
<b> http://localhost:5104</b>


0 comments on commit fb6c66f

Please sign in to comment.