Problem since I updated to nuxt 3.3
I get erro messages when starting the dev server:
1 - Failed to load url (... long path to file... ) .nuxt/paths.mjs. Does the file exist?
2 - node_modules/defu/dist/defu.mjs" is outside of Vite serving allow list
I reseatched it, but couldn't find a orking solution..;
any ideas?
thanks
52 Replies
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
Thanks for your answer. I tried the "npx init" command as you proposed, but I get this error: "npm ERR! could not determine executable to run". I'm familiar at all with the technical things happening behind the hood. π
The weird thing is that it all began when I created a new nuxt 3.3 project. My older project (3.0) started getting errors. That's when I decided to upgrade these older projects to 3.3.1. I can start de dev server, it works fine, byt these error are always there.
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
oh ok. thanks. I'll try that right away
I actually get the same erors (4 files missing) in the newly created 3.3.1 project.
3.3.1 was a windows only fix
because windows always needs help xD
I'm on windows
π
this was fix for urls since they used ehm https://github.com/nuxt/nuxt/pull/19676/commits/aa218a9f4988acd543ab7e8d189107444693f32f here xD
GitHub
fix(nuxi): use file url to start nuxi by danielroe Β· Pull Request #...
π Linked issue
resolves #19674
β Type of change
π Documentation (updates to the documentation or readme)
π Bug fix (a non-breaking change that fixes an issue)
π Enhancement (improving an existi...
Sorry, but I'm not sure I understand what I need to do with that.
I created the paths.mjs file that was missing... I get no more error, but is that a real fix, or just a fluke that hides bigger problems?
wait
did you remove the .nuxt folder
creating a file inside .nuxt folder is never a solution
show modules you have installed
or is it a fresh project
I haven't removed the nuxt folder. I just created the missing file to see if the error would go away. I had to older projects. Yesterday, I created a new one (3.3.1) and from then on, the two older projects started getting errors about the pths.mjs file the couldn't be found. The brand new project has the same errors. But I already imported some files and made changes. So I might heve imported uncompatible files from my older projects. I will recreate a new clean one.
So, I created a bran new project. npx nuxi init projectName, and yarn install. I still get the same erroe when running npm run dev: " Failed to load url .nuxt/paths.mjs. Does the file exist? "
hm
npx nuxi prepare
no this will automatically hanlded i think
i dont have a path.mjs in my .nuxt folder
show module you have
modules
ah nvm its a new one
node version
did you try pnpm
npx nuxi prepare doesn't seem to do anything,
the modules? what folder do you want to see?
pnpm? non I havezn't tried it
i know pnpm should not be the solution
i dont know what is path.mjs
@Likonima do you have path.mjs in your .nuxt folder
no.
but if I create it, the error goes away.
but like I said, it doesn't seem like a real solution.
lemme check if i can find a nuxt project rq
ah he ditched nuxt
π
ofc
ditched nuxt?
tell me whats the problem here marko?
Posoroko
OP
β gestern um 12:09 Uhr
I get erro messages when starting the dev server:
1 - Failed to load url (... long path to file... ) .nuxt/paths.mjs. Does the file exist?
2 - node_modules/defu/dist/defu.mjs" is outside of Vite serving allow list
I reseatched it, but couldn't find a orking solution..;
any ideas?
thanks
also he made a new project
yeah. I get the paths.mjs problem in a brand new 3.3.1 project.
and windows
i dont have this file may project was generated after 5minutes when 3.3.1 cames out
i just upgraded a 3.2 to 3.3. no errors
using windows and pnpm
why is this defu thing
which node version you have @Eric
i was about to ask
v16.13.0
upgrade to 16.14.x
i have read something about but not sure
because when 3.3 was relased it was broken on windows
then i read other stuff and they told to use 16.14.x but it was just random
has todo with modules path resolution what ever
ok doing this
i have this
i only know you need to have node v16.x.x i think
latest node version seems to be 18.15. I update to this one
ok
18.15.0 is not latest but with lts
use nvm
so you can switch easy
ok
but before just try
GitHub
GitHub - coreybutler/nvm-windows: A node.js version management util...
A node.js version management utility for Windows. Ironically written in Go. - GitHub - coreybutler/nvm-windows: A node.js version management utility for Windows. Ironically written in Go.
but just install new version now and later you can use nvm
you can enable and disable to go back to the version you have installed
oh shoot. I already install node 18.15 and nvm
So I updated to 18.15 and I ran npx nuxi prepare. But problem is still there.
I might heve read the error wrongly? here is the full error...Failed to load url /@fs/D:/Users/La Comète Verte/Documents/projets web/node_modules/ufo/dist/index.mjs?v=bfaf0afc (resolved id: D:/Users/La Comète Verte/Documents/projets web/node_modules/ufo/dist/index.mjs?v=bfaf0afc) in virtual:nuxt:D:/Users/La Comète Verte/Documents/projets web/Krismenn/Krismenn2.0/.nuxt/paths.mjs. Does the file exist?
i have no idea
make an issue
make a repo and keep the .nuxt folder in it
oh. ok. I never opened an issue... I make a repo on my github and put the link in the isssue I open ?
yea when you open a issue on nuxt they will tell you what you have todo
system nodeversion blabla packages
are you in wsl?
because that @fs stuff
no
looks like a symlink problem or something
but when you create the path.mjs manually it works
?
the project loads even with the error. And if I create the paths.mjs file, the error goes away
ok create an issue
and tell them
ok thanks a lot for your time and help... I really appreciate it!
I just finished a project for my first client. I haven't pushed the latest corrections to it because I dont want to push the error to the repo.
Do you think I should go back to the previous version for this finished project?
this errors happens only in3.3.1?
i dont know its your project ;D i would not push any errors
I upgraded the older and finished project because I started getting errors after createing a new 3.3.1 project. I'll see how it goes and I might just go back to 3.2 (I think it waqs 3.2)
ok
yea there a not so much big changes in 3.3 you can profit from most are for dx
but i just dont understand why its not working in a plain project
what modules are you use
I haven't installed ny modules yet in this new project. In the older projects, I only use the Directus module
when you remove it
and then clear the nuxt folder cache whate ever
does it work? XD
i haveno more solutions
I created a new folder on another drive on my computer, created a new project, and the error is no longer there. So it miht be a local problem? I'm not sure the repo I linked to the issue will recreate the bug on other machines...