1***@qq.com
1***@qq.com
  • 发布:2023-09-27 08:47
  • 更新:2023-09-27 09:15
  • 阅读:630

新手遇到低级问题需要请教

分类:HBuilderX

使用Hbuilder做第一个项目,页面运行时提示错误如下
百度里说需要安装插件:npm install @vitejs/plugin-vue
那么问题是在哪能够运行这个命令呢?
还是import newsPage from '*****' 书写有问题?
请各位大神不吝赤脚。

08:34:14.640 [Vue warn]: Unhandled error during execution of async component loader
at <AsyncComponentWrapper>
at <PageBody>
at <Page>
at <Anonymous>
at <KeepAlive>
at <RouterView>
at <Layout>
at <App>
08:34:14.642 TypeError: Failed to fetch dynamically imported module: http://localhost:5173/pages/applyList/list-page1.nvue?import at @fs/D:/Program%20Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-h5-vue/dist/vue.runtime.esm.js:1442
08:34:14.719 App Hide at App.vue:10
08:34:14.740 [vite] connecting...
08:34:14.792 [vite] connected.
08:34:14.793 08:34:14 [vite] [plugin:vite:import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. You may need to install appropriate plugins to handle the .nvue file format, or if it's an asset, add "*/.nvue" to assetsInclude in your configuration.
08:34:14.794 at pages/applyList/apply-item1.nvue:24:3
08:34:14.794 22 | }
08:34:14.794 23 |
08:34:14.794 24 | import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, vShow as _vShow, withCtx as _withCtx, createVNode as _createVNode, withDirectives as _withDirectives, openBlock as _openBlock, createBlock as _createBlock } from "vue"
08:34:14.794 | ^
08:34:14.809 25 |
08:34:14.809 26 | function _sfc_render(_ctx, _cache) {
08:34:14.882 App Launch at App.vue:4
08:34:14.886 App Show at App.vue:7
08:34:14.929 [Vue warn]: Unhandled error during execution of async component loader
at <AsyncComponentWrapper>
at <PageBody>
at <Page>
at <Anonymous>
at <KeepAlive>
at <RouterView>
at <Layout>
at <App>
08:34:14.930 TypeError: Failed to fetch dynamically imported module: http://localhost:5173/pages/applyList/list-page1.nvue?import at @fs/D:/Program%20Files/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-h5-vue/dist/vue.runtime.esm.js:1442
08:34:14.994 08:34:14 [vite] [plugin:vite:import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. You may need to install appropriate plugins to handle the .nvue file format, or if it's an asset, add "*/.nvue" to assetsInclude in your configuration.
08:34:14.994 at pages/applyList/apply-item1.nvue:24:3
08:34:14.994 22 | }
08:34:14.994 23 |
08:34:14.994 24 | import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, vShow as _vShow, withCtx as _withCtx, createVNode as _createVNode, withDirectives as _withDirectives, openBlock as _openBlock, createBlock as _createBlock } from "vue"
08:34:14.994 | ^
08:34:14.994 25 |
08:34:15.010 26 | function _sfc_render(_ctx, _cache) {

2023-09-27 08:47 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com (作者)

求解答,在线等

赵永强

赵永强 - 前端老菜鸟

你用的cli创建项目还是hbuilderx创建的项目

  • 1***@qq.com (作者)

    我是用hbuilderx创建的,刚发现是因为我在一个.nvue文件中import 另一个.nvue文件做为组件出现这个错误提示。

    我是仿照了xbuilder预置“新闻/资询模版”来做的,所以写法应该没问题,但是不知道demo里做了什么操作以后,可以做到这个效果。

    2023-09-27 09:36

  • 1***@qq.com (作者)

    我知道了,是页面创建方式不对,谢谢大神

    2023-09-27 09:59

要回复问题请先登录注册