Comments (4)
The error is to flag up to users who may be unaware. I think in your case handling it manually is right.
It's common, for example, to have a server plugin injecting something, e.g. $someVar
, which is not accessible on the client, and for users to think this is a Nuxt bug.
I think specifying a hard dependency on another plugin means it's needed, and we can't just assume that the user has accounted for it not being available on the client side.
So I think we'll leave this as is, but please do feel free to circle back if you think there's a better solution (or better log message)! 🙏
from nuxt.js.
Start a new pull request in StackBlitz Codeflow.
from nuxt.js.
I think this makes sense, as the dependency is unavailable on the client...
Why do you think:
I'm not sure whether it actually affects anything, but even the error message should probably not show up.
from nuxt.js.
It's a tricky situation. On one hand, it makes complete sense to show an error message when a dependency is not available on the client. However, in use cases like mine — where I want it to be a dependency on the server but not on the client — it might be misleading.
Maybe I'm thinking about it wrong…
I'm using the plugin to fetch some initial configuration on the server and store it in shared state using useState
.
I removed the .server
suffix from the dependency and added an early return when executed on the client to make the error message go away.
from nuxt.js.
Related Issues (20)
- [ERR_MODULE_NOT_FOUND]: Cannot find module after running production app HOT 8
- I'm using the caching system of nitro, which use the redis driver. If my redis connection fails, is there a way to make defineCachedEventHandler not report an error and not use the cache? HOT 1
- `navigateTo` with `open` and `name` params opens a home url. HOT 2
- FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory HOT 4
- HMR is broken for a simple skeleton app HOT 4
- Add a way to distinguish between server error/nonerror responses for client types HOT 6
- module disabled due to incompatibilty issues nuxt 4 HOT 2
- Navigation guards like onBeforeRouteLeave might prevent all navigation after upgrade to 3.12.3 HOT 4
- Provide original event to nuxt error page in SSR
- Option to disable fancy logs
- "404 Not Found" API Calls to the Server Directory HOT 1
- Nuxt page not loading HOT 1
- nuxt generate fails 3.12.3 vs 3.12.2 HOT 5
- Production Build Fails: "default" is not exported by "node_modules/unenv/runtime/polyfill/process.mjs" HOT 3
- Package import specifier "#internal/nitro/virtual/app-config" is not defined HOT 1
- nuxt3最新版本安装依赖的时候提示好几个”no longer supported“ HOT 3
- `nuxi dev --inspect` incorrect behavior (impossible to inspect nitro-runtime, server functions, middlewares and so on)
- global nuxt middleware runs when api returns error HOT 2
- render issues does not throw in SSR HOT 1
- `nuxt.options.nitro.publicAssets.push` leads to 404 errors HOT 8
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.js.