master代码启动报错

来源:2-4 让页面数据“动”起来,数据绑定、列表渲染、条件渲染入门j

你敢打老师

2024-10-16

图片描述
老师您好,我把master的代码下载下来,微信小程序启动报错。然后其他的包 我也pnpm install了想咨询一下启动报错是什么原因?

Couldn't resolve the Js file "mobx-miniprogram-bindings" relative to "/app.js:4:64"

Couldn't resolve the Js file "mobx-miniprogram" relative to "/store/tim.js:6:53"

Couldn't resolve the Js file "tim-wx-sdk" relative to "/store/tim.js:8:28"

Couldn't resolve the Js file "mobx-miniprogram-bindings" relative to "/pages/message/message.js:3:64"

Couldn't resolve the Js file "mobx-miniprogram-bindings" relative to "/pages/login/login.js:2:64"

Couldn't resolve the Js file "mobx-miniprogram-bindings" relative to "/pages/conversation/conversation.js:1:64"

Couldn't resolve the Js file "mobx-miniprogram-bindings" relative to "/utils/http.js:4:64"

Couldn't resolve the Js file "tim-wx-sdk" relative to "/model/tim.js:7:29"

Couldn't resolve the Js file "tim-upload-plugin" relative to "/model/tim.js:8:48"

Couldn't find the directory "./locale" relative to "/lib/moment.js:1:14270"

Couldn't resolve the Js file "mobx-miniprogram-bindings" relative to "/pages/conversation/components/conversation-window/conversation-window.js:1:66"

Couldn't resolve the Js file "tim-wx-sdk" relative to "/pages/conversation/components/conversation-window/conversation-window.js:4:28"

Couldn't resolve the Js file "tim-wx-sdk" relative to "/pages/conversation/components/message/message.js:2:28"

如需关闭依赖分析请在 project.config.json setting 字段中增加 "ignoreDevUnusedFiles": false 和 "ignoreUploadUnusedFiles": false
app.js错误:
 Error: module "utils/mobx-miniprogram-bindings.js" is not defined, require args is "mobx-miniprogram-bindings
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at r (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at http.js? [sm]:4
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at r (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at token.js? [sm]:6
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at r (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at app.js? [sm]:3
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)(env: macOS,mp,1.06.2407120; lib: 2.15.0)
WAServiceMainContext.js:2 Uncaught FrameworkError 
 module "utils/mobx-miniprogram-bindings.js" is not defined, require args is "mobx-miniprogram-bindings 
 Error: module "utils/mobx-miniprogram-bindings.js" is not defined, require args is "mobx-miniprogram-bindings
    at require (http://127.0.0.1:55146/appservice/__dev__/WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2:2369692)
    at r (http://127.0.0.1:55146/appservice/__dev__/WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2:2368549)
    at http://127.0.0.1:55146/appservice/utils/http.js:17:32
    at require (http://127.0.0.1:55146/appservice/__dev__/WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2:2369957)
    at r (http://127.0.0.1:55146/appservice/__dev__/WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2:2368549)
    at http://127.0.0.1:55146/appservice/model/token.js:12:36
    at require (http://127.0.0.1:55146/appservice/__dev__/WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2:2369957)
    at r (http://127.0.0.1:55146/appservice/__dev__/WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2:2368549)
    at http://127.0.0.1:55146/appservice/app.js:6:37
    at require (http://127.0.0.1:55146/appservice/__dev__/WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2:2369957)(env: macOS,mp,1.06.2407120; lib: 2.15.0)
I @ WAServiceMainContext.js:2
WAServiceMainContext.js:2 Error: module "utils/mobx-miniprogram-bindings.js" is not defined, require args is "mobx-miniprogram-bindings
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at r (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at http.js? [sm]:4
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at r (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at token.js? [sm]:6
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at r (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)
    at app.js? [sm]:3
    at require (WASubContext.js?t=wechat&s=1729086738077&v=2.15.0:2)(env: macOS,mp,1.06.2407120; lib: 2.15.0)
errorReport @ WAServiceMainContext.js:2
thirdErrorReport @ WAServiceMainContext.js:2
(anonymous) @ WAServiceMainContext.js:2
Page "pages/home/home" has not been registered yet.
写回答

1回答

沁尘

2024-11-19

看看仓库的 README.md文件。源码不是可执行文件,依赖都没安装自然跑不起来。

0
0

《慕慕到家》家政小程序组件化进阶实战-优质项目

千锤百炼的实践分享,成就你独当一面

494 学习 · 306 问题

查看课程