vue awesome swiper install failed on windows

Viewed 375

I'm trying to install vue-awesome-swiper with npm using this command

npm i vue-awesome-swiper --save

I'm getting this error

npm ERR! Line breaks can't be quoted on Windows

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\USERNAME\AppData\Local\npm-cache\_logs\2021-04-06T18_35_21_789Z-debug.log
1 Answers

I opened the log and I figured that the problem is caused by this line here

80 info run swiper@5.4.5 postinstall node_modules/swiper echo "[35m[1mLove Swiper? Support Vladimir's work by donating or pledging on patreon:[22m[39m
80 info run  > [32mhttps://patreon.com/vladimirkharlampidi[0m
80 info run "

As you can see from the log here it's triggering postinstall script and it's just trying to print a message to support the package author.

To fix this issue you can simply install the package without running any scripts with the --ignore-scripts flag like this:

npm i vue-awesome-swiper --save --ignore-scripts
Related