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
filename.split error on nuxt generate and ssr #583
Comments
jvrsolis
changed the title
filename.split error on nuxt generate and ssr and
filename.split error on nuxt generate and ssr
Jul 22, 2022
Facing the same issue... |
me too... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The error seems to come from vite trying split a filename that is actually a function. Specifically
The transpile defu function from this code line from the nuxt axios module. I was able to figure this out by doing a try catch and logging the the function.
node_modules/@nuxtjs/axios/lib/module.js:42
Here is the code that throws the errors don't mind the console log or try catch the issue was in filename.split which was the only code before my manual updates
The following list is the result is a console.log dump of the files the above code tries to "normalize"
As you can see the function pushed by the transpile defu from the axios module section is where its breaking down. I can also verify that from the try catch and logging the result of the function which is throws an error that points to that line of code in the axios module.
I am unsure how to fix this issue
Here are is the output from nuxi
Nuxt project info: 08:44:53
Darwin
v17.9.0
3.0.0-rc.6
[email protected]
vite
-
-
-
Currently running nuxt ^3.0.0-rc.6, vue ^3.2.37, @nuxtjs/axios ^5.13.6, vite 2.9.14
It all really gets initiated by
resolveSSRExternal (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:41142:31)
if i console log ssrExternals and ssrConfig i get:
As you can see the anonymous function from earlier is listed, do i have something wrong about my config? Maybe thats the issue?
I have this in the modules dir
modules: [
'@nuxtjs/dotenv',
'@nuxtjs/tailwindcss',
'@formkit/nuxt',
'@intlify/nuxt3',
'@nuxt/content',
['@nuxtjs/axios', {proxyHeaders:false}],
'@pinia/nuxt'
],
Seems if i just change the function to a string defu like in some suggestions ive seen it works.
The alternative is using nuxtjs-alt/axios for now
The text was updated successfully, but these errors were encountered: