开发者工具外部预览时提示"error: /app.json not find"
- 当前 Bug 的表现(可附上截图)
开发工具外部调用预览(http方式)会返回


{"code":40000,"error":"错误 Error: 缺少文件, error: /app.json not found"}
的错误消息,关闭开发者工具再次打开,就正常了,但是只能预览一次,再次调用错误就会重现。app.json文件是有的。
- 预期表现
多次调用可以正常预览
1 回复
是不是用的其他构建工具,每次都删除掉了 upload 目录重新创建了?
工具监听的节点都被删除会有这种问题,并且是无法避免的
请使用 project.config.json 来配置小程序目录,保证项目的根节点不要随便被删除
参考文档
https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html