1

I'm working on an Angular project. When I launch ng serve, the build fails as you can see below.

image

karel
  • 5,489
  • 46
  • 45
  • 50
  • 1
    Does [this](https://stackoverflow.com/a/64626556/11719787) answer your question. Also please add more description in the question like when did you get this error? After updating angular project or any package, also try restarting your server. – Sameer Oct 03 '21 at 07:51
  • 1
    Trying right now will update shortly can we sync up on a google meet or skype? I am desprate – Lesley Noble Oct 03 '21 at 07:54
  • Hello, and welcome to stack overflow. Might you please [edit] your question to include your errors as **text** rather than as a screenshot? It's policy here not to to use images for this purpose, see [*Discourage screenshots of code and/or errors*](https://meta.stackoverflow.com/a/307500) and [*Why not upload images of code on SO when asking a question*](https://meta.stackoverflow.com/a/285557) for why. You're most likely to get an answer if you include a full [mcve] *as text* showing exactly how to reproduce the issue. See: [ask]. – dbc Oct 05 '21 at 05:22
  • Please provide enough code so others can better understand or reproduce the problem. – Community Oct 10 '21 at 05:10

1 Answers1

1

This is due to the fact that the Sass module of the 6.0.1 version is not compatible with the file written for version 4.0.0

npm uninstall node-sass
npm install node-sass@4.0.0

Or, using Yarn:

yarn remove node-sass
yarn add node-sass@4.0.0
ExDoors
  • 119
  • 1
  • 5
  • Build failed again "C:\Users\Lariab Sajid\collision-report-app-master\node_modules\node-sass\build\binding.sln" (default target) (1) -> "C:\Users\Lariab Sajid\collision-report-app-master\node_modules\node-sass\build\binding.vcxproj.metaproj" (default target) (2) -> "C:\Users\Lariab Sajid\collision-report-app-master\node_modules\node-sass\build\src\libsass.vcxproj" (default target) (3) -> (SetTelemetryEnvironmentVariables target) -> C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.DesignTime.targets(491,5): error MSB4062: – Lesley Noble Oct 03 '21 at 08:04
  • C:\Program Files (x86)\Microsoft VisualStudio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.DesignTime.targets(491,5): error MSB4062: The "SetEnv" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft VisualStudio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll. Could not load file or assembly'Microsoft.Build.Utilities.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the asse – Lesley Noble Oct 03 '21 at 08:10