0
votes

I am currently using npm task in my build pipeline in azure devops. Recently the npm run step started failing with below error. When I manually install the sass and sass-loader the npm run step passes without any error. How can I install the complete modules from pipeline.?

ERROR in Module build failed (from ./node_modules/@angular-devkit/build-angular/node_modules/sass-loader/lib/loader.js):

2
Please share your pipeline with us and if possible package.json.Krzysztof Madej
have you tried set binary configuration parameters like SASS_BINARY_SITE? github.com/sass/node-sass#binary-configuration-parameters node-sass is difficult especially when you are run npm install against a mirror registry or behind a proxy etclastr2d2
Can i set from the pipeline to install the sass modules?chipri
yeah, it can be done in process parameter, or in your .npmrc, or simply environment variableslastr2d2

2 Answers

0
votes

You can try the following ways to see if the problem can be solved:

  1. Execute the npm install command to install the node-sass (see here) in the pipeline.

    npm install -D node-sass
    
  2. Reconfigure your npm package on the local machine.

    • Install or upgrade Angular to the latest version.
    • Check out the source repository to the local machine.
    • Remove the nose modules and the package lock.
    • Reinstall the refresh dependencies for your package via the npm isntall command.
    • Push the changes to the remote repository, then try the pipeline.
0
votes

I have fixed the issue by adding another step with npm task and passed and argument(sass-loader) to install the sass modules.