Skip to content
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

全局配置缺少 pages 字段 #13672

Closed
seasonHL opened this issue Apr 15, 2023 · 4 comments
Closed

全局配置缺少 pages 字段 #13672

seasonHL opened this issue Apr 15, 2023 · 4 comments

Comments

@seasonHL
Copy link

相关平台

微信小程序

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

复现步骤

taro init taro-demo
? 请输入项目介绍 none
? 请选择框架 React
? 是否需要使用 TypeScript ? Yes
? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass
? 请选择编译工具 Webpack5
? 请选择包管理工具 pnpm
? 请选择模板源 Gitee(最快)
√ 拉取远程模板仓库成功!
? 请选择模板 默认模板
pnpm dev:weapp

期望结果

正常运行

实际结果

throw new Error('全局配置缺少 pages 字段,请检查!');

环境信息

  Taro CLI 3.6.2 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 18.13.0 - D:\Program Files\node.EXE
      Yarn: 1.22.19 - D:\npm\global\yarn.CMD
      npm: 9.6.3 - D:\Program Files\npm.CMD
@xuanzebin
Copy link
Member

升级到最新版本 3.6.5 试一下

@zhikeye
Copy link

zhikeye commented Apr 15, 2023

3.6.5的好像要把webpack 依赖设置为 5.78.0,
具体可以看下安装的时候提示哪些依赖的版本不符合,修改到提示的版本就行。

@cocoonnu
Copy link

解决办法:#13544 (comment)

@hap2023
Copy link

hap2023 commented Apr 15, 2023

#13544
这个方法可以解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants