N
Nuxtβ€’2y ago
Eric

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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Eric
EricOPβ€’2y ago
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
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Eric
EricOPβ€’2y ago
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.
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
3.3.1 was a windows only fix because windows always needs help xD
Eric
EricOPβ€’2y ago
I'm on windows πŸ™‚
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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...
Eric
EricOPβ€’2y ago
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?
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
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? "
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
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
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
no. but if I create it, the error goes away. but like I said, it doesn't seem like a real solution.
Likonima
Likonimaβ€’2y ago
lemme check if i can find a nuxt project rq
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
ah he ditched nuxt πŸ˜„
Likonima
Likonimaβ€’2y ago
ofc
Eric
EricOPβ€’2y ago
ditched nuxt?
Likonima
Likonimaβ€’2y ago
tell me whats the problem here marko?
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
yeah. I get the paths.mjs problem in a brand new 3.3.1 project.
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
and windows i dont have this file may project was generated after 5minutes when 3.3.1 cames out
Likonima
Likonimaβ€’2y ago
i just upgraded a 3.2 to 3.3. no errors using windows and pnpm
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
why is this defu thing which node version you have @Eric
Likonima
Likonimaβ€’2y ago
i was about to ask
Eric
EricOPβ€’2y ago
v16.13.0
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
ok doing this
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
i only know you need to have node v16.x.x i think
Eric
EricOPβ€’2y ago
latest node version seems to be 18.15. I update to this one
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
ok 18.15.0 is not latest but with lts use nvm so you can switch easy
Eric
EricOPβ€’2y ago
ok
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
but before just try
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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.
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
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?
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
i have no idea make an issue make a repo and keep the .nuxt folder in it
Eric
EricOPβ€’2y ago
oh. ok. I never opened an issue... I make a repo on my github and put the link in the isssue I open ?
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
no
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
looks like a symlink problem or something but when you create the path.mjs manually it works ?
Eric
EricOPβ€’2y ago
the project loads even with the error. And if I create the paths.mjs file, the error goes away
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
ok create an issue and tell them
Eric
EricOPβ€’2y ago
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?
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
this errors happens only in3.3.1? i dont know its your project ;D i would not push any errors
Eric
EricOPβ€’2y ago
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)
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
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
Eric
EricOPβ€’2y ago
I haven't installed ny modules yet in this new project. In the older projects, I only use the Directus module
πŸ‡¨πŸ‡­ Marko Bolliger <cannap>
when you remove it and then clear the nuxt folder cache whate ever does it work? XD i haveno more solutions
Eric
EricOPβ€’2y ago
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...
Want results from more Discord servers?
Add your server