aos.js plugin file
import AOS from "aos"; import "aos/dist/aos.js"; import "aos/dist/aos.css"; export default ({ app }) => { app.AOS = new AOS.init({ disable: "phone" }); // or any other options you need };
I have added css and plugin path both nuxt.config.ts
I am getting this error even after doing all the thing correctly
Cannot set properties of undefined (setting 'AOS')
at default (http://localhost:3001/_nuxt/plugins/aos.js?t=1679420446019:5:13) at fn (http://localhost:3001/_nuxt/node_modules/nuxt/dist/app/nuxt.mjs?v=32a07478:141:27) at callWithNuxt (http://localhost:3001/_nuxt/node_modules/nuxt/dist/app/nuxt.mjs?v=32a07478:146:12) at applyPlugin (http://localhost:3001/_nuxt/node_modules/nuxt/dist/app/nuxt.mjs?v=32a07478:92:29) at applyPlugins (http://localhost:3001/_nuxt/node_modules/nuxt/dist/app/nuxt.mjs?v=32a07478:101:11) at async initApp (http://localhost:3001/_nuxt/F:/Projects/freelance-task/MaxCoach_Nuxt3Tailwind/node_modules/nuxt/dist/app/entry.mjs:39:7)
aos.js plugin file
import AOS from "aos"; import "aos/dist/aos.js"; import "aos/dist/aos.css"; export default ({ app }) => { app.AOS = new AOS.init({ disable: "phone" }); // or any other options you need };
I have added css and plugin path both nuxt.config.ts
can you tell me solution of it ASAP