- 14
- 0
报错信息如下:
wait Rendering static HTML...
Rendering page: /[Vue warn]: Error in render: "TypeError: Cannot read property 'match' of undefined"
found in
---> <NavLink>
<NavLinks>
<Navbar>
<Anonymous>
<Anonymous>
<Root>
error Error rendering /: false
undefined
TypeError: Cannot read property 'match' of undefined
at ensureExt (node_modules/@vuepress/theme-default/util/index.js:35:0)
at Proxy.link (node_modules/@vuepress/theme-default/components/NavLink.vue:32:23)
at Proxy.computedGetter (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue\dist\vue.runtime.common.dev.js:4825:15)
at Proxy.NavLinkvue_type_template_id_1366ae69_render (node_modules/@vuepress/theme-default/components/NavLink.vue?ee96:1:89)
at VueComponent.Vue._render (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue\dist\vue.runtime.common.dev.js:3532:22)
at resolve (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:8400:27)
at waitForServerPrefetch (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:8272:3)
at renderComponentInner (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:8411:3)
at renderComponent (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:8368:5) at RenderContext.renderNode (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:8279:5)
at RenderContext.next (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:2598:23)
at cachedWrite (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:2451:9)
at renderStringNode$1 (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:8496:5)
at RenderContext.renderNode (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:8277:5)
at RenderContext.next (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:2598:23)
at RenderContext.cachedWrite [as write] (C:\Users\chenzhanwei\Desktop\Blog\node_modules\vue-server-renderer\build.dev.js:2451:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Blog@1.0.0 docs:build: `vuepress build docs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Blog@1.0.0 docs:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\chenzhanwei\AppData\Roaming\npm-cache\_logs\2019-06-22T16_02_28_395Z-debug.log - 共 0 条
- 全部回答
-
乆違的感覺 普通会员 1楼
This error typically occurs when trying to use VuePress, a popular open-source blog and documentation generator for Vue.js, with a Vue component that is not properly defined. The error message "Cannot read property 'match' of undefined" indicates that the component you're trying to use is trying to access the
matchproperty from the Vue instance'smatchMediaevent listener, but thematchMediaevent listener is not defined in your component's HTML.Here are the steps to resolve this issue:
- Make sure your VuePress project has properly installed the
vuepressandvuepress-materialpackages:
bash npm install -g vuepress npm install -g vuepress-material- Create a new Vuepress project or navigate to an existing one:
bash vuepress new my-projectReplace
my-projectwith the desired name for your project.- Create a new
src/componentsdirectory and add a new Vue component that should define thematchMediaevent listener. The component should contain the following:
```html
```
Replace the content inside the
<div v-match="match"></div>tag with your actual content that you want to display in the blog or documentation.- In your
pages/_app.vuefile, import and register theMatchMediaComponent:
```html
```
Make sure to replace
my-matchwith the value you defined in thepropsprop of theMatchMediaComponent. Thepropsprop is required for the component to be properly registered and used in the parent component.- Run the
buildcommand to generate thepublicdirectory and build your VuePress project:
bash vuepress build- Visit your VuePress project's root directory in your web browser (
http://localhost:3000in development mode) to see the built project with theMatchMediaComponentcomponent.
If you encounter any other issues or errors related to the
MatchMediaComponent, please provide more details, including the component's code, thesrcdirectory structure, and any additional error messages or logs. These insights can help narrow down the issue and provide a more specific solution. - Make sure your VuePress project has properly installed the
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部
