taro
taro copied to clipboard
生产环境打包报错 Error: [object Object] is not a PostCSS plugin
相关平台
微信小程序
小程序基础库: 2.25.0 使用框架: React
复现步骤
npm run build:weapp
期望结果
正常打包
实际结果
打包报错:
Error: app.wxss from Css Minimizer plugin
Error: [object Object] is not a PostCSS plugin
环境信息
👽 Taro v3.5.2
Taro CLI 3.5.2 environment info:
System:
OS: macOS 10.15.5
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.19.3 - ~/.nvm/versions/node/v14.19.3/bin/node
npm: 6.14.17 - ~/.nvm/versions/node/v14.19.3/bin/npm
npmPackages:
@tarojs/cli: 3.5.2 => 3.5.2
@tarojs/components: 3.5.2 => 3.5.2
@tarojs/helper: 3.5.2 => 3.5.2
@tarojs/plugin-framework-react: 3.5.2 => 3.5.2
@tarojs/plugin-platform-alipay: 3.5.2 => 3.5.2
@tarojs/plugin-platform-jd: 3.5.2 => 3.5.2
@tarojs/plugin-platform-qq: 3.5.2 => 3.5.2
@tarojs/plugin-platform-swan: 3.5.2 => 3.5.2
@tarojs/plugin-platform-tt: 3.5.2 => 3.5.2
@tarojs/plugin-platform-weapp: 3.5.2 => 3.5.2
@tarojs/react: 3.5.2 => 3.5.2
@tarojs/router: 3.5.2 => 3.5.2
@tarojs/runtime: 3.5.2 => 3.5.2
@tarojs/shared: 3.5.2 => 3.5.2
@tarojs/taro: 3.5.2 => 3.5.2
@tarojs/taro-h5: 3.5.2 => 3.5.2
babel-preset-taro: 3.5.2 => 3.5.2
eslint-config-taro: 3.5.2 => 3.5.2
react: ^18.0.0 => 18.2.0
现在把包管理工具由npm
改为yarn
就可以正常npm run build:weapp
了。
解决了吗 3.5.4 build 还是报这个错误
@ywanhzy 提供一下 demo?
@Chen-jj
@ywanhzy 提供一下 demo?
https://github.com/ywanhzy/taro-demo
顺便看下这个问题,感谢 yarn dev:weapp
mobx 使用装饰器报错
✘ [ERROR] Unexpected "@"
src/components/common/empty.js:10:0:
10 │ @inject('store')
╵ ^
✘ [ERROR] Expected identifier but found "@"
src/store/app.js:10:2:
10 │ @observable newSystemInfo ...
╵ ^
我这边通过 npm i postcss -D 重新安装postcss后能正常打包
现在把包管理工具由
npm
改为yarn
就可以正常npm run build:weapp
了。
的确可以了,但是为什么会这样...
依照 #12274 可解决,一般是 stylelint 依赖了低版本。