-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运行 taro build --type h5 失败 #13963
Comments
@videni 视频太糊,init 的选项发一下 |
@Chen-jj 下面是整个执行过程, 简单的第一次安装。
👽 Taro v3.6.7 ⚠ 获取 taro 全局配置文件失败,不存在全局配置文件:/root/.taro-global-config/index.json Taro 即将创建一个新项目! ? 请输入项目介绍 first taro project ✔ 创建项目: mini-app ✔ cd mini-app, 执行 git init
yarn run v1.22.19 Tips:
✖ Webpack ✖ Errors: ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): error Command failed with exit code 1.
yarn run v1.22.19 Tips:
✖ Webpack ✖ Errors: ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): error Command failed with exit code 1. |
@videni 这个错误信息,不是安装失败吧,是运行 这是我的环境信息,建议切到 Taro CLI 3.6.7 environment info:
System:
OS: macOS 13.1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
npmPackages:
@tarojs/cli: 3.6.7 => 3.6.7
@tarojs/components: 3.6.7 => 3.6.7
@tarojs/helper: 3.6.7 => 3.6.7
@tarojs/plugin-framework-react: 3.6.7 => 3.6.7
@tarojs/plugin-platform-alipay: 3.6.7 => 3.6.7
@tarojs/plugin-platform-h5: 3.6.7 => 3.6.7
@tarojs/plugin-platform-jd: 3.6.7 => 3.6.7
@tarojs/plugin-platform-qq: 3.6.7 => 3.6.7
@tarojs/plugin-platform-swan: 3.6.7 => 3.6.7
@tarojs/plugin-platform-tt: 3.6.7 => 3.6.7
@tarojs/plugin-platform-weapp: 3.6.7 => 3.6.7
@tarojs/react: 3.6.7 => 3.6.7
@tarojs/runtime: 3.6.7 => 3.6.7
@tarojs/shared: 3.6.7 => 3.6.7
@tarojs/taro: 3.6.7 => 3.6.7
@tarojs/webpack5-runner: 3.6.7 => 3.6.7
babel-preset-taro: 3.6.7 => 3.6.7
eslint-config-taro: 3.6.7 => 3.6.7
react: ^18.0.0 => 18.2.0 |
node 18没有问题,我用的就是 node 18 + pnpm , 不如 不用 taro-hooks,使用默认模板 + pnpm 试下 |
@TheKonka 一样的,测试默认模板也一样的错误。 |
@Chen-jj 测试 node 16, 一样的错误。 应该是有bug, 跟我环境无关。 可以说大多数的模板都抛出同样的错误。估计是/postcss-loader/哪里引入了错误。 oot@ee3f1da950f5:/var/www/html# node -v added 782 packages in 2m 79 packages are looking for funding ⚠ 获取 taro 全局配置文件失败,不存在全局配置文件:/root/.taro-global-config/index.json Taro 即将创建一个新项目! ? 请输入项目介绍 first taro project ✔ 创建项目: mini-app ✔ cd mini-app, 执行 git init Tips:
✖ Webpack ✖ Errors: ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): error Command failed with exit code 1. |
解决方法: 在更目录添加文件
|
相关平台
H5
复现仓库
[email protected]:videni/taro-mini-app-demo.git
浏览器版本: 无
使用框架: React
复现步骤
完全按照官方的文档的安装流程:
yarn global add @tarojs/cli
taro init mini-app
期望结果
无错误
实际结果
✖ Errors:
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
TypeError: Cannot read properties of undefined (reading 'config')
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
环境信息
The text was updated successfully, but these errors were encountered: