问答详情
源自:4-2 Vant组件库

老师,这是什么问题

jsEnginScriptError

Component is not found in path "pages/movie/vant-weapp/button" (using by "pages/movie/movie")

Error: Component is not found in path "pages/movie/vant-weapp/button" (using by "pages/movie/movie")

    at e (http://127.0.0.1:51245/appservice/__dev__/WAService.js:17:5779)

    at e (http://127.0.0.1:51245/appservice/__dev__/WAService.js:17:5965)

    at le (http://127.0.0.1:51245/appservice/__dev__/WAService.js:17:16366)

    at Object.i.addView (http://127.0.0.1:51245/appservice/__dev__/WAService.js:17:17734)

    at Function.value (http://127.0.0.1:51245/appservice/__dev__/WAService.js:19:15869)

    at $t (http://127.0.0.1:51245/appservice/__dev__/WAService.js:19:29701)

    at on (http://127.0.0.1:51245/appservice/__dev__/WAService.js:20:235)

    at sn (http://127.0.0.1:51245/appservice/__dev__/WAService.js:20:573)

    at Function.<anonymous> (http://127.0.0.1:51245/appservice/__dev__/WAService.js:20:3006)

    at L.<anonymous> (http://127.0.0.1:51245/appservice/__dev__/WAService.js:19:1500)

console.error @ VM1494:1

errorReport @ VM1510 WAService.js:4

(anonymous) @ VM1510 WAService.js:4

M @ VM1510 WAService.js:19

(anonymous) @ VM1510 WAService.js:19

L.emit @ VM1510 WAService.js:8

emit @ VM1510 WAService.js:6

(anonymous) @ VM1510 WAService.js:9

(anonymous) @ VM1510 WAService.js:6

n @ VM1508 asdebug.js:1

(anonymous) @ VM1508 asdebug.js:1

(anonymous) @ VM1508 asdebug.js:1

_ws.onmessage @ VM1508 asdebug.js:1



提问者:宝慕林0154832 2019-08-01 16:33

个回答

  • yesopst
    2020-03-06 16:54:26

    遇到了相同的问题,这样写就对了

    "van-button": "/@vant/weapp/button/index"

  • 宝慕林0154832
    2019-08-02 13:45:57

    老师,不好意思,好了,刚才敲错了

  • 宝慕林0154832
    2019-08-02 13:42:41

    老师,还是不行啊!这是路径的问题吗?

  • 谢成
    2019-08-01 21:45:38

    在movie.json文件中这样引入组件试试:

    "van-button": "/miniprogram_npm/vant-weapp/button/index"