unable to run
derar-toothpick opened this issue · comments
vite_ssr_import_2.default is not a function
I had the same problem when running. I just made the clone with no code changes. I would like to collaborate with the project, I will look for a solution, but if you have any tips it would be of great help.
Here is all the output of my terminal:
Nuxt CLI v3.0.0-rc.4-27609974.fe508f5 19:23:51
19:23:51
> Local: http://localhost:3000/
> Network: http://192.168.15.200:3000/
WARN [kit] [compat] Using extendBuild in Nuxt 3 has no effect. Instead call extendWebpackConfig and extendViteConfig. 19:23:57
WARN [kit] [compat] Using extendBuild in Nuxt 3 has no effect. Instead call extendWebpackConfig and extendViteConfig. 19:23:58
i WindCSS Analysis: http://localhost:4000/ nuxt-windicss 19:23:59
i Please create ~/components/content and restart the Nuxt server to use components in Markdown @nuxt/content 19:23:59
i nuxt-windicss v2.4.2 running with config: ./windi.config.ts. nuxt-windicss 19:24:02
i Vite client warmed up in 3054ms 19:24:09
i Vite server warmed up in 304ms 19:24:09
√ Vite server built in 3248ms 19:24:12
√ Vite server built in 187ms 19:24:12
√ Nitro built in 1246 ms nitro 19:24:13
[Vue warn]: Unhandled error during execution of setup function
at <App>
[nuxt] [request error] __vite_ssr_import_2__.default is not a function
at /C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:29330:60
at fn (/C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:535:27)
at Object.callAsync (/C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/node_modules/unctx/dist/index.mjs:41:19)
at callWithNuxt (/C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:537:23)
at applyPlugin (/C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:492:29)
at Module.applyPlugins (/C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:502:11)
at async createNuxtAppServer (/C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:46:7)
at async Object.renderToString (/C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/node_modules/vue-bundle-renderer/dist/index.mjs:264:19)
at async /C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dev/index.mjs:3077:20
at async /C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/node_modules/h3/dist/index.mjs:420:19
[nitro] [dev] [unhandledRejection] SyntaxError: Need to install with `app.use` function
at Module.createCompileError (file:///C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:15108:19)
at createI18nError (file:///C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:10452:34)
at Module.useI18n (file:///C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:12572:15)
at Module.LanguageManager (file:///C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:31703:44)
at Module.AppSetup (file:///C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:33380:49)
at setup (file:///C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:30477:27)
at _sfc_main.setup (file:///C:/Users/gabri/Documentos/GabrielRocha/repos/nuxt3-awesome-starter/.nuxt/dist/server/server.mjs:30553:23)
at callWithErrorHandling (C:\Users\gabri\Documentos\GabrielRocha\repos\nuxt3-awesome-starter\node_modules\@vue\runtime-core\dist\runtime-core.cjs.js:157:22)
at setupStatefulComponent (C:\Users\gabri\Documentos\GabrielRocha\repos\nuxt3-awesome-starter\node_modules\@vue\runtime-core\dist\runtime-core.cjs.js:7084:29)
at setupComponent (C:\Users\gabri\Documentos\GabrielRocha\repos\nuxt3-awesome-starter\node_modules\@vue\runtime-core\dist\runtime-core.cjs.js:7039:11) {
code: 18,
domain: undefined
}
I don't really know about this problem.
but looking at the logs that have been shown, I think this error occurs in Modules i18n.
Then I visited the https://github.com/intlify/nuxt3 repository to see the issues and it turned out that there was one match.
looks like it doesn't really work on windows properly (problem is with OS support), cause in Linux & Mac its fine.
according to the following reply intlify/nuxt3#63 (comment).
this error can be resolved by updating the intlify dependency to version 0.2.3.
or you can see my commit 58315a2 which updates this dependency.
Ok, it fixed my issue.