app.json的"usingComponents"配置了全局自定义组件 有的组
发布于 6 年前 作者 weiwen 14803 次浏览 来自 问答

jsEnginScriptError

Component is not found in path “miniprogram-navigation-bar/index” (using by “components/advModal/modal”);onAppRoute

Error: Component is not found in path “miniprogram-navigation-bar/index” (using by “components/advModal/modal”)

    at e (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:621161)

    at e (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:621347)

    at e (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:621347)

    at Q (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:621489)

    at Object.t.addView (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:622927)

    at Function.value (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:686609)

    at Et (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:701178)

    at Pt (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:702984)

    at At (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:704277)

    at Function.<anonymous> (http://127.0.0.1:32741/appservice/__dev__/WAService.js:1:705249)

引入全局自定义组件 其他的自定义组件报错了

4 回复

我也出现了这个问题,检查发现如果定义了多层级路径以后就会找不到。

如:

    components/componentA/componentA 这样是找不到插件的组件路径的,而组件存放路径为 components/componentA 则可行

miniprogram-navigation-bar

这是 npm 包吗

请问怎么解决的?

app.json能引入组件???

回到顶部