-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Error after upgrading to Nuxt 3.8.2: [ERROR] No matching export in "node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/default.js" for import "toPath"
#24387
Comments
[ERROR] No matching export in "node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/default.js" for import "toPath"
Would you be able to provide a reproduction? 🙏 More infoWhy do I need to provide a reproduction?Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. What will happen?If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect. If How can I create a reproduction?We have a couple of templates for starting with a minimal reproduction: 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as minimal as possible. See more details in our guide. You might also find these other articles interesting and/or helpful: |
We are having the same issue. I've been able to boil it down to the And a reproduction: |
i have the same issue with storyblok and nuxt |
@jordypereira @lammerfalcon thanks for your feedback, I am using Storyblok myself, thanks for pinpointing this. Their module does not seem to have been updated to the |
I think that the error occurs because of the nitro version 2.8.0 and I don’t quite understand how to downgrade to version 2.7, it seems that nuxt 3.4.0 - 3.8.2 now always comes with 2.8.0. But for our project i need at least nuxt 3.7.0 version. |
I found a quick solution |
'globby' was updated to v14.0.0 a couple weeks back, which introduced an import for 'toPath' from the author's 'unicorn-magic' package, which has one release and no export named toPath. Seems like an error by the author maybe? Globby v13.2.2 does not have that import, so overriding or using resolutions to set globby to v13.2.2 for the time being worked for me: In package.json:
|
The issue here is that the storyblok module was pulling the module/build-time code into the runtime context by adding it to I've raised storyblok/storyblok-nuxt#662 which fixes the issue and should also speed up your dev server environment. If anyone is experiencing this and isn't using |
@danielroe thanks for your PR to fix the module! |
@danielroe Thanks for your help, much to learn! |
Not at all! Your investigation was very helpful ❤️ |
unfortunately, I am not using I also tried to use "nuxt": "^3.3.3", |
I have this issue when building with Nitro's cloudflare-pages preset. With node-server it's fine. Here are my dependencies"devDependencies": { |
I am using Nuxt 3.8.2 with nitro 2.8.0 Using also Prismic as headless. The website is hosted on Vercel and works fine
|
If you can provide a minimal reproduction, we can have a look 🙏 |
Hi @danielroe NITRO_PRESET=cloudflare-pages nuxt build Problem is |
That does not reproduce the issue. (This issue should only occur when you are importing |
@danielroe Hi sorry so much: in terminal try please
|
I'm sorry! I have find hot to resolve problem "nuxt-simple-sitemap": "^3.4.1", must be updated to "4.1.6" |
Thanks @boxexchanger for all your troubleshooting. For me, it was caused by |
@danielroe can you please take a look. I'm working on a module for Nuxt that uses globby. The same error occurs. The minimal reproduction:
You may try it here: This error is completely confusing, since my module as part of the Nuxt project (inside the |
@imm That is caused by the fact that you have several different versions of globby installed but you haven't declared a dependency on globby in your package.json. Once you run |
@danielroe Thank you very much! |
I'm getthing this error after ugrading nuxt 3.8.1 to nuxt 3.9.2 is there something i need to include in vite.optimizeDeps or is there a way to debug if i have a package that needs another version of a dependency?
|
fixed this by adding "globby" to build.transpile. |
I am also facing the same issue, super unclear to me where it comes from. Trying to figure out whats wrong here. Super complicated. |
This comes from wrongly importing nuxt/kit in your runtime Nuxt app. (It's only meant for use in modules or your Nuxt config file.) Likely the issue is a module you are using which is using useLogger or similar in the runtime code they inject. |
I encountered the same issue and migrated my module to Nuxt Layers. It wasn't that complicated and fits in my opinion much better into the embedding application. Perhaps this could be a fallback for some here. |
Thank you for the quick answers, guys! In my case it became complicated as I (due to other reasons) did not update all my packages for a while and they are of course dependent to each other.
In my case, the issue (pretty certain) came from '@vite-pwa/nuxt', but it was very hard to pinpoint and still im only 90% sure, not 100%, but after removing this package, the error disappeared.
defineStore will be autoimported anyways so just register the autoimports as follows:
Maybe it's relevant for someone, it was hard to find online by googling so, just for keywords sake: [mapStores issue nuxt pinia mapStores not defined] |
Environment
Reproduction
3.8.2
by usingnpx nuxi upgrade --force
pnpm dev
, the following error occurspnpm generate
thenpnpm preview
does not seem to report any obvious errorDescribe the bug
Error output:
Additional context
The error seems to originate in
globby@14.0.0
, in my lockfile this version is used only by:@nuxt/kit@3.8.2
nitropack@2.8.0
nuxt@3.8.2
unicorn-magic@0.1.0
is present in my lockfile only as a dependency ofglobby@14.0.0
Logs
No response
The text was updated successfully, but these errors were encountered: