繁体   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