dcloudio / hello-uniapp

uni-app框架演示示例
https://uniapp.dcloud.net.cn
MIT License
2.73k stars 1.64k forks source link

使用HBuilderx新建的项目运行报错 #77

Open xuehang1 opened 1 year ago

xuehang1 commented 1 year ago

uni-app新手,使用HBuilderx工具新建的项目无法正常运行,浏览器中报错: “chunk-vendors.js:1768 [Vue warn]: Property or method "keepAliveInclude" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.” [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

(found in at R:/Cloud/Documents/HBuilderProjects/hello/App.vue)

但是使用vue-cli新增的项目就可以运行,请问这是什么原因呢?工具中一直提示“项目未关联uniCloud服务空间,请调整后重新运行uni-app项目”。但实际已经创建过服务空间。 烦请各位前辈解惑

hbcui1984 commented 1 year ago

在uniCloud目录上,右键关联服务空间。

xuehang1 commented 1 year ago

在uniCloud目录上,右键关联服务空间。

非常感谢您的解答。根据您的回复进行相关操作,目前我的项目中uniCloud目录右侧显示了关联的阿里云目录。但是运行浏览器端还是会报错,以下信息: chunk-vendors.js:1768 [Vue warn]: Property or method "keepAliveInclude" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

(found in at R:/Cloud/Documents/HBuilderProjects/hello/App.vue) warn @ chunk-vendors.js:1768 chunk-vendors.js:1768 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

(found in at R:/Cloud/Documents/HBuilderProjects/hello/App.vue) 请问是还需要在DCloud的uniCloud的菜单下做哪些配置么?非常期待您的解答。