我犯了一个错误,运行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的,而不是我当前的项目。它的软件包是apparently安装到D:\Users\User\AppData\Local\npm-cache
,但在那里或LocalLow
中没有npx的条目。我确实找到并删除了D:\Users\User\AppData\Roaming\npm-cache\_npx
,但这并没有改变任何东西,即使在重新启动后。
我该怎么用核弹把它炸了?
2条答案
按热度按时间kmbjn2e31#
我仍然不知道是什么原因导致每次运行
npm run dev
时突然运行depcheck
-因此,不知道如何正确修复它-但我确实找到了一个解决方法,可以阻止我发疯:在webpack.mix.js
中添加第三个参数到我的Sass构建步骤中,以传入quietDeps: true
Sass选项:我突然不得不在以前不需要的地方使用它,这很烦人,但我宁愿这样,也不愿遭受更多的弃用警告。
7z5jn7bk2#
你似乎认为
depcheck
或npx
在某种程度上要对弃用警告负责,但我不确定你为什么这么想,在你的日志输出中没有任何地方提到它们。另外,depcheck
可能在您的机器上已经不存在了,因为当您使用npx
时,它会临时下载并安装软件包,运行它,然后再次删除它。(它可能存在于npm缓存中,但这并不做任何事情,它只是一个缓存。这只是Sass不赞成将
%
传递给全局CSS函数abs
的选项,但Bootstrap仍然使用它,导致dart-sass
自版本1.65.0(2023年8月17日)以来发出此警告。可能你最近更新了你的依赖项,或者至少dart-sass
更新到了一个新版本,这个版本开始弃用这个功能。There is an open GitHub issue about this in the Bootstrap repository.你必须等待他们修复它并更新Bootstrap。在此之前,忽略它,您无论如何都无法对此做任何事情(除了可能将
dart-sass
固定到尚未弃用该功能的旧版本(1.64.1),但这通常不是正确的解决方案)。它也不会造成任何伤害。