如何卸载 depcheck/npx?

问题描述 投票:0回答:1

我犯了一个错误,运行

npx depcheck
并在提示我安装它时按Y。现在,每当我运行
npm run dev
时,我都会看到未来弃用的警告,主要是在我什至不负责的上游代码库中,并且我无法卸载
depcheck
,因为它没有在我的
package.lock
中列出,正在搜索它在我的项目中使用 VS Code 不会执行任何操作,并且在我的整个系统上使用 Everything 搜索它不会显示任何内容。不知何故,
depcheck
不存在,但每次我尝试构建项目时仍然会弹出警告我有关弃用错误的信息。

这看起来更像是

npx
而不是
depcheck
的问题,因为我之前运行过
npm install depcheck
没有问题。关于
npx
的某些内容似乎创建了无法删除的隐形软件包,并且在未经许可的情况下将自己附加到像
npm run dev
这样的脚本,这对我来说似乎非常接近恶意软件的定义。

这是我的

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 » resources\css\payments.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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 » resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\_alert.scss 65:66  @import
    resources\sass\app.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_modules\bootstrap\scss\_list-group.scss 187:84  @import
    resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\_alert.scss 65:66  @import
    resources\sass\app.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_modules\bootstrap\scss\_list-group.scss 187:84  @import
    resources\sass\app.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_modules\bootstrap\scss\vendor\_rfs.scss 57:14         divide()
    node_modules\bootstrap\scss\mixins\_grid.scss 59:12        row-cols()
    node_modules\bootstrap\scss\mixins\_grid.scss 85:13        @content
    node_modules\bootstrap\scss\mixins\_breakpoints.scss 68:5  media-breakpoint-up()
    node_modules\bootstrap\scss\mixins\_grid.scss 72:5         make-grid-columns()
    node_modules\bootstrap\scss\_grid.scss 32:3                @import
    resources\sass\app.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_modules\bootstrap\scss\_alert.scss 65:66  @import
    resources\sass\app.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_modules\bootstrap\scss\_list-group.scss 187:84  @import
    resources\sass\app.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
什么也不返回,但
which npx
告诉我
npx
全局安装到Windows而不是我当前的项目。它的软件包显然安装到了
D:\Users\User\AppData\Local\npm-cache
,但是那里或
LocalLow
中没有npx的条目。我确实找到并删除了
D:\Users\User\AppData\Roaming\npm-cache\_npx
,但即使重新启动后也没有改变任何东西。

我该如何用核武器攻击这个东西?

laravel windows npm package-managers npx
1个回答
0
投票

您似乎认为

depcheck
npx
在某种程度上对弃用警告负有责任,但我不确定您为什么这么认为,日志输出中甚至没有提到其中任何一个。

这只是 Sass 弃用了全局 CSS 函数

abs
但 Bootstrap 仍然使用它,导致此警告的原因。

Bootstrap 存储库中有一个关于此问题的开放 GitHub 问题。 您必须等待他们修复它并更新 Bootstrap。在那之前,忽略它,无论如何你都无法对它做任何事情(除了将 Sass 固定到尚未弃用该功能的旧版本之外,但这通常不是正确的解决方案)。它也不会造成任何伤害。

© www.soinside.com 2019 - 2024. All rights reserved.