Taro 3.5.8 打包报错

j8yoct9x  于 2023-02-04  发布在  其他
关注(0)|答案(2)|浏览(456)

相关平台

微信小程序

小程序基础库: 最新
使用框架: React

复现步骤

npm run build

期望结果

执行成功

实际结果

ModuleBuildError: Module build failed (from ./node_modules/@tarojs/webpack5-runner/node_modules/postcss-loader/dist/cjs.js):
TypeError: (0 , _cosmiconfig.cosmiconfig) is not a function

环境信息

process.env.NODE_ENV undefined

  Taro CLI 3.5.2 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.12.0 - /usr/local/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.1.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.8 => 3.5.8 
      @tarojs/components: 3.5.8 => 3.5.8 
      @tarojs/helper: 3.5.8 => 3.5.8 
      @tarojs/plugin-framework-react: 3.5.8 => 3.5.8 
      @tarojs/plugin-html: 3.5.8 => 3.5.8 
      @tarojs/plugin-platform-weapp: 3.5.8 => 3.5.8 
      @tarojs/react: 3.5.8 => 3.5.8 
      @tarojs/router: 3.5.8 => 3.5.8 
      @tarojs/runtime: 3.5.8 => 3.5.8 
      @tarojs/shared: 3.5.8 => 3.5.8 
      @tarojs/taro: 3.5.8 => 3.5.8 
      @tarojs/taro-h5: 3.5.8 => 3.5.8 
      babel-preset-taro: 3.5.8 => 3.5.8 
      eslint-config-taro: 3.5.8 => 3.5.8 
      react: ^18.0.0 => 18.2.0

补充信息

cssnano/cssnano-nightly#4

相关问题