You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add missing config to nuxt.config.ts from the example in the docs
add Naive UI components in one of your templates, <n-time/> in my case
get the following error:
[plugin:vite:import-analysis] Failed to resolve import "naive-ui" from "components/posts/Card/ReadOnly.vue". Does the file exist?
20 | function _createElementVNode(...args) { return _interopVNode(__createElementVNode(...args)) }
21 | /* Injection by vite-plugin-vue-inspector End */
22 | /* unplugin-vue-components disabled */import { NTime as __unplugin_components_0 } from 'naive-ui';
| ^
23 | import { defineComponent as _defineComponent } from "vue";
24 |
I managed to fix it by manually running npm i naive-ui, so its seems like a bug in one of the packages mentioned above, or maybe its the intended behavior? in that case please update the docs, right now it seems like installing the nuxt module is enough
Describe the bug
following the official docs for Nuxt integration gives you error 500
Steps to reproduce
Following the steps described in docs:
npx nuxi module add nuxtjs-naive-ui
npm i unplugin-auto-import
npm i unplugin-vue-components
nuxt.config.ts
from the example in the docs<n-time/>
in my caseget the following error:
I managed to fix it by manually running
npm i naive-ui
, so its seems like a bug in one of the packages mentioned above, or maybe its the intended behavior? in that case please update the docs, right now it seems like installing the nuxt module is enoughLink to minimal reproduction
https://codesandbox.io/p/sandbox/nuxt-naive-ui-autoimport-bug-7t3jkh
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: