ERROR filename.split is not a function 08:19:59
at normalizePath (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:2418:23)
at getMatcherString$1 (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:2427:16)
at Object.test (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:2446:33)
at result (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:2462:25)
at Array.filter (<anonymous>)
at resolveSSRExternal (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:41141:31)
at doBuild (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:41603:36)
at async Module.build (node_modules/vite/dist/node/chunks/dep-c9998dc6.js:41557:16)
at async buildServer (node_modules/@nuxt/vite-builder/dist/index.mjs:646:5)
at async bundle (node_modules/@nuxt/vite-builder/dist/index.mjs:899:3)
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.
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
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
Operating System: Darwin
Node Version: v17.9.0
Nuxt Version: 3.0.0-rc.6
Package Manager: npm@8.8.0
Builder: vite
User Config: -
Runtime Modules: -
Build Modules: -
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)
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 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
npm@8.8.0
vite
-
-
Build Modules:
-
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