Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vant-demo nuxt3无法正常运行在生产环境 #97

Open
powerlau opened this issue Jan 7, 2022 · 2 comments
Open

vant-demo nuxt3无法正常运行在生产环境 #97

powerlau opened this issue Jan 7, 2022 · 2 comments

Comments

@powerlau
Copy link

powerlau commented Jan 7, 2022

执行yarn dev 可以正常运行在开发环境页面也显示正常,运行yarn dev & yarn start 虽然不会报错,但是打开网页终端会显示如下错误,且页面显示不正常。
image

Listening on http://localhost:3000
TypeError: Cannot read properties of null (reading 'proxy')
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\image\Image.js:47:39)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at Object.ssrRenderComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:10220:12)
at _sfc_ssrRender (file:///D:/dev/codes/nuxt3/.output/server/chunks/server.mjs:3437:32)
at renderComponentSubTree (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9860:13)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9811:16)
at Object.ssrRenderComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:10220:12)
[Vue warn]: Component van-image is missing template or render function.
[Vue warn]: provide() can only be used inside setup().
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
[Vue warn]: Component van-cell is missing template or render function.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
[Vue warn]: Component van-cell is missing template or render function.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
[Vue warn]: Component van-cell is missing template or render function.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
[Vue warn]: Component van-cell is missing template or render function.
TypeError: Cannot read properties of null (reading 'proxy')
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\image\Image.js:47:39)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at Object.ssrRenderComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:10220:12)
at _sfc_ssrRender (file:///D:/dev/codes/nuxt3/.output/server/chunks/server.mjs:3437:32)
at renderComponentSubTree (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9860:13)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9811:16)
at Object.ssrRenderComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:10220:12)
[Vue warn]: Component van-image is missing template or render function.
[Vue warn]: provide() can only be used inside setup().
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
[Vue warn]: Component van-cell is missing template or render function.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
[Vue warn]: Component van-cell is missing template or render function.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
[Vue warn]: Component van-cell is missing template or render function.
TypeError: Cannot read properties of null (reading 'proxy')
at useRoute (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\composables\use-route.js:36:42)
at setup (D:\dev\codes\nuxt3.output\server\node_modules\vant\lib\cell\Cell.js:50:40)
at callWithErrorHandling (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:7189:22)
at setupStatefulComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6905:29)
at setupComponent (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:6886:11)
at renderComponentVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9795:17)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9901:22)
at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)
at renderVNode (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9893:13)

at renderVNodeChildren (file:///D:/dev/codes/nuxt3/.output/server/chunks/index.mjs:9916:9)

[Vue warn]: Component van-cell is missing template or render function.

@chenjiahan

@hqwlkj
Copy link

hqwlkj commented May 24, 2022

我遇到了这个问题


[nuxt] [request error] The requested module 'vant' does not provide an export named 'AddressEdit'
  at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)  
  at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)  
  at async Promise.all (index 0)  
  at async ESMLoader.import (node:internal/modules/esm/loader:385:24)  
  at async ./server/chunks/handlers/renderer.mjs:11130:24  
  at async ./server/chunks/handlers/renderer.mjs:11186:64  
  at async ./server/node_modules/h3/dist/index.mjs:417:19  
  at async nodeHandler (./server/node_modules/h3/dist/index.mjs:367:7)  
  at async ufetch (./server/node_modules/unenv/runtime/fetch/index.mjs:9:17)  
  at async $fetchRaw2 (./server/node_modules/ohmyfetch/dist/chunks/fetch.mjs:131:20)

@leosin
Copy link

leosin commented Jun 9, 2022

image

我这个打包generate的时候出的错,dev时候没问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants