Boppity Bop
Boppity Bop

Reputation: 10463

ASP.NET Core - cannot uninstall node-sass

When I build Angular12 ASP.NET Core 5.0.7 app I get this warning

'node-sass' usage is deprecated and will be removed in a future major version. To opt-out of the deprecated behaviour and start using 'sass' uninstall 'node-sass'

I tried npm uninstall node-sass which finishes without error but the warning and node-sass folder in node-modules are persist.

How do I get rid of node-sass?

EDIT In package-lock I see the following:

    "node_modules/node-sass": {
      "version": "5.0.0",
      "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-5.0.0.tgz",
      "integrity": "sha512-opNgmlu83ZCF792U281Ry7tak9IbVC+AKnXGovcQ8LG8wFaJv6cLnRlc6DIHlmNxWEexB5bZxi9SZ9JyUuOYjw==",
      "dev": true,
      "hasInstallScript": true,
      "optional": true,
      "peer": true,
      "dependencies": {
        "async-foreach": "^0.1.3",
        "chalk": "^1.1.1",
        "cross-spawn": "^7.0.3",
        "gaze": "^1.0.0",
        "get-stdin": "^4.0.1",
        "glob": "^7.0.3",
        "lodash": "^4.17.15",
        "meow": "^3.7.0",
        "mkdirp": "^0.5.1",
        "nan": "^2.13.2",
        "node-gyp": "^7.1.0",
        "npmlog": "^4.0.0",
        "request": "^2.88.0",
        "sass-graph": "2.2.5",
        "stdout-stream": "^1.4.0",
        "true-case-path": "^1.0.2"
      },
      "bin": {
        "node-sass": "bin/node-sass"
      },
      "engines": {
        "node": ">=10"
      }
    },

npm ls node-sass gives:

`-- @angular-devkit/[email protected]
  `-- [email protected]
    `-- [email protected]

versions:

Angular CLI: 12.0.5
Node: 14.17.0
Package Manager: npm 7.14.0
OS: win32 x64

Angular: 12.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.5
@angular-devkit/build-angular   12.0.5
@angular-devkit/core            12.0.5
@angular-devkit/schematics      12.0.5
@schematics/angular             12.0.5
rxjs                            6.6.7
typescript                      4.2.4

Upvotes: 1

Views: 1893

Answers (1)

Sergio Velasquez
Sergio Velasquez

Reputation: 186

Have you checked if the library is installed globally, or still in your package.json?

1 - Make sure it's not in your package.json, and package-lock.json 2 - check whether another library is including it by running npm ls node-sass 3 - This should not be the cause but, if none of the above give you more information, try uninstalling from global by passing -g.

Upvotes: 1

Related Questions