Comments (7)
Finally found the solution to my problem, had to this this:
nuxt.config.ts
export default defineNuxtConfig({
future: {
typescriptBundlerResolution: false
}
})
https://nuxt.com/blog/v3-10#bundler-module-resolution
from nuxt.
Most likely dupe of #23984
from nuxt.
@manniL in my case I have shamefully-hoist=true
and adding public-hoist-pattern[]=*nitropack*
did not help. It still gives me this error even after deleting node_modules and pnpm-lock file and reinstalling dependencies.
Cannot find module 'nitropack'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
from nuxt.
I see that with Nuxt 3.10 the "moduleResolution" has been changed from "Node" to "Bundler" which seems to be causing the issue for me. What can I do about this?
from nuxt.
@martinszeltins Weird, I can't reproduce the problem with bundler resolution + PNPM on my end 🤔
from nuxt.
@martinszeltins Weird, I can't reproduce the problem with bundler resolution + PNPM on my end 🤔
Honestly, no idea but I'm glad the typescriptBundlerResolution
setting fixed it. With Bundler resolution all these 3 lines were showing errors, when switching to Node the errors are gone.
import type { FetchResult } from 'nuxt/dist/app/composables/fetch.d.ts'
import type { KeysOf, PickFrom } from 'nuxt/dist/app/composables/asyncData'
import type { NitroFetchRequest, AvailableRouterMethod as _AvailableRouterMethod } from 'nitropack'
from nuxt.
Using regular npm
and running in to the same issue as Martins.
Though for me it was for defineNuxtConfig
, import {createResolver} from "@nuxt/kit";
and more.
Workaround seems to work for now.
from nuxt.
Related Issues (20)
- Disabling SSR prevents remaining CSS from loading HOT 5
- Error: Cannot find module punycode/ HOT 9
- Img @error not working HOT 2
- useHead undefined after initiating a regex (since monday) HOT 4
- keepalive not work HOT 1
- String vs object errors with `createError` and accessing server-thrown errors on client
- Tailwind css issue related to CSS specificity on dev server HOT 1
- keep alive caches are destroyed when visit keep alive excluded page HOT 3
- The package generated under the .output/server/node_modules file is a hyperlink. HOT 2
- 'text/html' is not a valid JavaScript MIME type. HOT 2
- This module cannot be imported in the Vue part of your app. [importing @nuxt/kit from app.vue] causing page to not work HOT 5
- If a component uses empty data in `useFetch`, then `clearError` will be invalidated HOT 2
- Cache control header missing in response headers (while using nitro.publicAssets) HOT 7
- [nuxt] [request error] [unhandled] [500] _fetch is not a function HOT 3
- feat: support passing options to `TypedRouterOptions` when using `experimental.typedPages` HOT 3
- Dynamic layouts HOT 4
- Previous route info HOT 2
- Imported CSS files not correctly injected in circumstances involving lazy-loaded components HOT 1
- Nuxt 3 Dev build time is very slow in WSL 2 Linux Ubuntu ~ ranging up to 30 seconds just to refresh changes HOT 3
- Warning during nuxt generate - cache-driver.js is imported by "virtual:#internal/nitro/virtual/storage", but could not be resolved HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.