geeklearningio / gl-vsts-tasks-yarn

Yarn Package Manager Visual Studio Team Services Build and Release Management extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yarn tasks suddenly failing with node-sass module not found error since Dec1 2021

YarnUser31 opened this issue · comments

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • [ Bug] Bug
  • Feature request

Description

Task geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2 failing since Dec1 suddenly with below error
ERROR in Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Cannot find module 'node-sass'
Require stack:

  • /home/vsts/work/1/s/packages/app/node_modules/sass-loader/lib/loader.js
  • /home/vsts/work/1/s/packages/app/node_modules/loader-runner/lib/loadLoader.js
  • /home/vsts/work/1/s/packages/app/node_modules/loader-runner/lib/LoaderRunner.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/NormalModule.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/NormalModuleFactory.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/Compiler.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/webpack.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/build-webpack/src/webpack/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/build-webpack/src/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/build-angular/src/browser/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/architect/src/architect-legacy.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/architect/src/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/models/architect-command.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/commands/build-impl.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/schematics/tools/export-ref.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/schematics/tools/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/utilities/json-schema.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/models/command-runner.js

Insert your description here

Expected behavior

Describe the expected behavior

Reproduction

Insert reproduction steps here

MANDATORY FOR BUGS: Insert debug trace

ERROR in Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Cannot find module 'node-sass'
Require stack:

  • /home/vsts/work/1/s/packages/app/node_modules/sass-loader/lib/loader.js
  • /home/vsts/work/1/s/packages/app/node_modules/loader-runner/lib/loadLoader.js
  • /home/vsts/work/1/s/packages/app/node_modules/loader-runner/lib/LoaderRunner.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/NormalModule.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/NormalModuleFactory.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/Compiler.js
  • /home/vsts/work/1/s/packages/app/node_modules/webpack/lib/webpack.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/build-webpack/src/webpack/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/build-webpack/src/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/build-angular/src/browser/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/architect/src/architect-legacy.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/architect/src/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/models/architect-command.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/commands/build-impl.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/schematics/tools/export-ref.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular-devkit/schematics/tools/index.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/utilities/json-schema.js
  • /home/vsts/work/1/s/packages/app/node_modules/@angular/cli/models/command-runner.js

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • [VSTS ] VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • [Linux ] Linux

*Yarn version:1.5
Yarn version

*Node version:8
Node version

I don't think this is related to the task. But rather to one of your dependency.

also worth noting Yarn now comes in standard on Azure pipelines image and you may not need this task at all anymore, you can just use a script task instead.

@YarnUser31 This problem is related to node-sass and azure. Azure pipelines were updated on November 29 to Node 16 and your versions of node-sass probably is valid up to v14
Upgrade your node-sass (since May 2021 supports Node v16) or change the pipeline setting to use Node v14