From f08919841ed33ff510364d048e1187bdb601c24d Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Mon, 13 Mar 2017 17:08:35 -0700 Subject: [PATCH] Adding Troubleshooting to the SPA instructions --- .vs/slnx.sqlite | Bin 77824 -> 77824 bytes 06.-Setting-the-Web-SPA-application-up.md | 7 +++++++ 2 files changed, 7 insertions(+) diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 41ffd80b6027dc0927af7ba8a3c2a893fa86a9d7..a4a609b2f1d184d36175a6f8fee0a165cc8c8006 100644 GIT binary patch delta 2057 zcmZ8iYfM{J96yKNd+xg(k8Uk}0Uc0UZh4JuK$sK?d+5}t^RWzhv>oes6sUj+F3^$a z5HfJbc!4orS!O22+0@L$4}>MtIUmb(n={!=SmvT;8B@P48slwyZ()A>-T(9Vf1NwJ zOpGoQ(xfOtEJT6BM1bYW?gRI5~2g7*yNPrRn?GLmM;5$b=#C|~fu{d5yEdruO zGYqk7=NA0lxDj!E0EGj1aonz{)r{cY+3MKF*DcV%T>@De5w;HmyZmB%@TIU==I-t3 z2w=~IK@R}X_w;s){R2H>!XmE1eG|=uSyPiH)w$q?*uN75VZ8yK*VGHhO5E0TqIQa) z=5&X31gb#Ss1~*t=S&F#SKyo3upmF-r56z}LK-REP!m5>NP&o6j&^Lm(V+_07a(AgZC`HdZtD;Bq>>cn zBjAZ=eta^UF{{>6$OMa&d?!q>P=Oas(4xS*CYY~q&r!Iq%&*~IYlbGh%;OIan*;T{77EvesO~bgM7<(k=5ZuFD1c+g6DdLSB&ZgoMs zA`N*RYF#J1CN4>s7XY~%FM3^B$!}o-XshJyOFq%~zBjifsjvkQ5M{;xU-cCGjMn6F z4VG25sP#%i#js>^Vn*3M1nlzd`MQGQP_V}z8VaXQBC`#F_}k$Q4}@A(U;Ig<+5-Gz z;~1NyA^$!Kq$v^RNfV;lEGa6grAs$N=vL}&X{u1`omqw7H;t*%z1#Py@bm383Y0!9 HQ4j4uTIO76g`EXL&4W5vja=^`TM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=&IOATvvc;!$!?hSW^8X%pXi2pYOuXNM+JNte;r@ue;Hf?Yls|m AApigX diff --git a/06.-Setting-the-Web-SPA-application-up.md b/06.-Setting-the-Web-SPA-application-up.md index 8a45c13..839e9b0 100644 --- a/06.-Setting-the-Web-SPA-application-up.md +++ b/06.-Setting-the-Web-SPA-application-up.md @@ -61,6 +61,13 @@ At this point, if you were originally following the eShopOnContainer setup for a 3. **CLI on Mac:** Build the .NET bits with the build-container based on dontnet CLI and Docker CLI, as explained in this page: https://github.com/dotnet/eShopOnContainers/wiki/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-Code-and-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code) +## Troubleshooting the SPA app when building from the CLI + +The Docker image build could do npm install if needed, but this installs npm linux packages, not the windows ones. As the docker container used for build has a volume mapping with the source code, that means that the "node_modules" of the SPA web application ends having npm linux modules. In fact, windows & linux modules are the same (they’re node modules, so are in js) but windows modules have an additional .cmd file in the node_modules\.bin folder. This file is needed for all CLI-invokable modules (like webpack or rimraf). As linux modules do no have it, **if you build once with the docker image, and later do you want to build using the windows CLI you will get errors due to not having these files. Solution here is delete the "node_modules" folder and do an npm install (from Windows)**. + +How to avoid having this issue?: doing an "npm install" from Windows BEFORE running the docker CI build, as documented here: https://github.com/dotnet/eShopOnContainers/wiki/03.-Setting-the-eShopOnContainers-solution-up-in-a-Windows-CLI-environment-(dotnet-CLI,-Docker-CLI-and-VS-Code) + +Everytime you change from Linux based build (Docker) to a Windows based build (CLI) you’ll need to do “npm rebuild node-sass”. Our Docker compose ci.build file does it for you, but if you switch to windows, you’ll need to do it manually. ## Sending feedback and pull requests We'd appreciate to your feedback, improvements and ideas.