egidiusmengelberg / nuxt-aos

A Nuxt module that adds Animate On Scroll
https://www.npmjs.com/package/nuxt-aos
MIT License
65 stars 5 forks source link

Bug: require() of ES Module node_modules/string-width/index.js from /node_modules/wide-align/align.js not supported. Instead change the require of index.js in /node_modules/wide-align/align.js to a dynamic import() which is available in all CommonJS modules. #28

Closed hafizjavaid closed 3 months ago

hafizjavaid commented 3 months ago

Nuxt Version: 3.11.2 nuxt-aos Version: 1.2.4

I tried two node versions 18, 20 but I faced the following error

BTW just to be clear as soon as I removed aos package, everything works fine

image

I'm not sure why it's happening

Pardon me if issue is not clear as I'm still new to this

Best, Hafiz

hafizjavaid commented 3 months ago

Found the sloution. It's related to Yarn. Here's the answer

https://github.com/nuxt/nuxt/issues/21231#issuecomment-2067519752