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

Cannot read property 'ssrUtils' of undefined #192

Closed
gitsheny opened this issue Mar 10, 2023 · 1 comment
Closed

Cannot read property 'ssrUtils' of undefined #192

gitsheny opened this issue Mar 10, 2023 · 1 comment

Comments

@gitsheny
Copy link

if i set manualChunks with vite version > 4.0.4.
build and serve, its error.
if vite version 4.0.4 its ok
maybe its vite problem ?

 // vite.config.js
  build: {
    rollupOptions: {
      output: {
        manualChunks(id) {
          if (id.includes('node_modules')) {
            return id.toString().split('node_modules/')[1].split('/')[0].toString()
          }
        },
      },
    },
  },
D:\test\v2\dist\server\assets\@vue-7c2e52dd.js:14903
const { createComponentInstance, setCurrentRenderingInstance, setupComponent, renderComponentRoot, normalizeVNode } = vue.vueExports.ssrUtils;
                                                                                                                                     ^        

TypeError: Cannot read property 'ssrUtils' of undefined
    at Object.<anonymous> (D:\test\v2\dist\server\assets\@vue-7c2e52dd.js:14903:134)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (D:\test\v2\dist\server\assets\vue-66bf41ba.js:2:14)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
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

1 participant