skip to Main Content

I made the mistake of running npx depcheck and pressing Y when it prompted me to install it. Now whenever I run npm run dev I see warnings of future deprecations, mostly in upstream codebases I’m not even responsible for, and I’m unable to uninstall depcheck because it isn’t listed in my package.lock, searching for it in my project with VS Code doesn’t do anything, and searching for it on my entire system with Everything doesn’t show anything. Somehow, depcheck doesn’t exist and yet still pops up to warn me about deprecation errors everytime I try to build my project.

This seems more like a problem with npx than depcheck because I’ve run npm install depcheck before without issue. Something about npx seems to create invisible packages that can’t be removed and that attach themselves to scripts like npm run dev without permission, which seems pretty close to the definition of malware to me.

Here’s the current output of my npm run dev:

$ npm run dev

> dev
> npm run development


> development
> mix


* Mix █████████████████████████ building (37%) 4/8 entries 339/339 dependencies 113/120 modules 5 activ
e
css-loader » postcss-loader » resourcescsspayments.css|0

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet


* Mix █████████████████████████ building (58%) 7/8 entries 340/340 dependencies 119/121 modules 2 activ
e
css-loader » postcss-loader » sass-loader » resourcessassapp.scss|0

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet


* Mix █████████████████████████ sealing (75%) chunk optimization
RemoveEmptyChunksPlugin

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet


* Mix █████████████████████████ sealing (88%)
runtime requirements

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet


* Mix █████████████████████████ sealing (92%)
asset processing

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet


* Mix █████████████████████████ emitting (95%)
emit

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet


* Mix █████████████████████████ emitting (98%)
after emit

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(40%)
To emit a CSS abs() now: abs(#{40%})
More info: https://sass-lang.com/d/abs-percent

╷
65 │     $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
│                                                                  ^^^^^^^^^^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscss_alert.scss 65:66  @import
    resourcessassapp.scss 34:9                   root stylesheet

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(40%)
To emit a CSS abs() now: abs(#{40%})
More info: https://sass-lang.com/d/abs-percent

    ╷
187 │     $list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-
item-color-scale));
    │                                                                                    ^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^
    ╵
    node_modulesbootstrapscss_list-group.scss 187:84  @import
    resourcessassapp.scss 36:9                         root stylesheet




* Mix █████████████████████████ done (99%) plugins
WebpackBar:done

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(40%)
To emit a CSS abs() now: abs(#{40%})
More info: https://sass-lang.com/d/abs-percent

╷
65 │     $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
│                                                                  ^^^^^^^^^^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscss_alert.scss 65:66  @import
    resourcessassapp.scss 34:9                   root stylesheet

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(40%)
To emit a CSS abs() now: abs(#{40%})
More info: https://sass-lang.com/d/abs-percent

    ╷
187 │     $list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-
item-color-scale));
    │                                                                                    ^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^
    ╵
    node_modulesbootstrapscss_list-group.scss 187:84  @import
    resourcessassapp.scss 36:9                         root stylesheet

√ Mix
Compiled successfully in 18.97s

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(100%)
To emit a CSS abs() now: abs(#{100%})
More info: https://sass-lang.com/d/abs-percent

╷
57 │   $dividend: abs($dividend);
│              ^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscssvendor_rfs.scss 57:14         divide()
    node_modulesbootstrapscssmixins_grid.scss 59:12        row-cols()
    node_modulesbootstrapscssmixins_grid.scss 85:13        @content
    node_modulesbootstrapscssmixins_breakpoints.scss 68:5  media-breakpoint-up()
    node_modulesbootstrapscssmixins_grid.scss 72:5         make-grid-columns()
    node_modulesbootstrapscss_grid.scss 32:3                @import
    resourcessassapp.scss 20:9                               root stylesheet

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(40%)
To emit a CSS abs() now: abs(#{40%})
More info: https://sass-lang.com/d/abs-percent

╷
65 │     $alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
│                                                                  ^^^^^^^^^^^^^^^^^^^^^^^
╵
    node_modulesbootstrapscss_alert.scss 65:66  @import
    resourcessassapp.scss 34:9                   root stylesheet

Deprecation Warning: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.
To preserve current behavior: math.abs(40%)
To emit a CSS abs() now: abs(#{40%})
More info: https://sass-lang.com/d/abs-percent

    ╷
187 │     $list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-
item-color-scale));
    │                                                                                    ^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^
    ╵
    node_modulesbootstrapscss_list-group.scss 187:84  @import
    resourcessassapp.scss 36:9                         root stylesheet


Laravel Mix v6.0.49


✔ Compiled Successfully in 18693ms
┌────────────────────────────────────────────────────────────────────────────────────────────┬──────────┐
│                                                                                       File │ Size     │
├────────────────────────────────────────────────────────────────────────────────────────────┼──────────┤
│                                                                                 /js/app.js │ 14.2 KiB │
│                                                                                /js/main.js │ 30.7 KiB │
│                                                                            /js/manifest.js │ 7.66 KiB │
│                                                                             /js/success.js │ 3.53 KiB │
│                                                                              /js/vendor.js │ 2.33 MiB │
│                                                                                css/app.css │ 542 KiB  │
│                                                                               css/main.css │ 28 KiB   │
│                                                                           css/payments.css │ 4.53 KiB │
└────────────────────────────────────────────────────────────────────────────────────────────┴──────────┘
webpack compiled successfully

which depcheck returns nothing but which npx tells me that npx is installed globally to Windows rather than my current project. Packages for it are apparently installed to D:UsersUserAppDataLocalnpm-cache, but there’s no entry for npx there or in LocalLow. I did find and remove D:UsersUserAppDataRoamingnpm-cache_npx, but this hasn’t changed anything even after a reboot.

How do I nuke this thing already?

2

Answers


  1. Chosen as BEST ANSWER

    I still have no idea what exactly is suddenly causing depcheck to run everytime I run npm run dev- and therefore, have no idea how to properly fix it - but I did find a workaround that'll stop me from going crazy: adding a third argument to my Sass build step in webpack.mix.js to pass in the quietDeps: true Sass option:

      .sass("resources/sass/app.scss", "public/css", {
        sassOptions: {
          quietDeps: true,
        },
      })
    

    It's annoying that I'm suddenly having to use it where I never needed to before, but I'd rather this than suffer any more deprecation warnings.


  2. You seem to think that depcheck or npx are somehow responsible for the deprecation warnings, but I’m not sure why you think that, nowhere in your log output is any of them even mentioned. Also, depcheck probably doesn’t even exist on your machine anymore because when you use npx, it will temporarily download and install the package, run it, and then delete it again. (It might exist in the npm cache but that doesn’t do anything, it’s just a cache.)

    It’s simply the case that Sass deprecated the option to pass % to the global CSS function abs but Bootstrap still uses it, causing this warning emitted by dart-sass since version 1.65.0 (August 17th, 2023). Probably you recently updated your dependencies or at least dart-sass to a newer version which started deprecating this feature.

    There is an open GitHub issue about this in the Bootstrap repository. You have to wait for them to fix it and update Bootstrap then. Until then, ignore it, you can’t do anything about it anyway (other than perhaps pinning dart-sass to an older version (1.64.1) that doesn’t yet have the feature deprecated, but that’s usually not the right solution). It also doesn’t cause any harm.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search