簡體   English   中英

帶有Gulp的PostCSS在更新后引發錯誤

[英]PostCSS with Gulp throws an error after update

我使用ncu更新了npm軟件包(npm檢查更新)。 更新所有軟件包后,構建過程將引發錯誤。

完成我的gulp任務並刪除了一個名為“ Precss”的PostCSS插件之后,所有事情都可以正常工作。 我還嘗試過將此插件單獨還原為舊版本,並且可以正常工作。

不幸的是,Precss是我需要的主要插件,以便在CSS中使用類似SASS的功能。 該插件必須具有最新版本,因為另一個名為postcss-calc的插件取決於Precss插件。

下面是拋出的錯誤:

Node#before is deprecated. Use Node#raws.before
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 9): TypeError: Cannot set property 'parent' of undefined
(node:8447) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): TypeError: Cannot set property 'parent' of undefined

我只是遇到了同樣的問題,通過package.json中的修復依賴關系而不是使用``最新''版本來解決...

有我的模塊版本,希望對您有所幫助:

$ npm list --depth=0
├── autoprefixer@6.7.7
├── browser-sync@2.18.11
├── gulp@3.9.1
├── gulp-autoprefixer@3.1.1
├── gulp-clean@0.3.2
├── gulp-concat@2.6.1
├── gulp-concat-css@2.3.0
├── gulp-cssbeautify@0.1.3
├── gulp-cssnano@2.1.2
├── gulp-csso@3.0.0
├── gulp-load-plugins@1.5.0
├── gulp-notify@2.2.0
├── gulp-plumber@1.1.0
├── gulp-postcss@6.4.0
├── gulp-rename@1.2.2
├── gulp-sourcemaps@2.4.1
├── postcss-sorting@2.0.1
└── precss@1.4.0

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM