Skip to content

安装 swiper 失败

安装swiper的低版本依赖包,在高版本的npm下容易失败。下载swiper5.4.5时,使用npm6可以成功,使用npm8时则会失败。

取决于swiper安装是否成功的是npm的版本,而不是node的版本。

如果在当前环境下使用了全局定版本的npm,那就需要自己手动调整npm的版本。

bash
npm i -g npm@6.x

如果当前环境的npmnode版本是相互依赖的,那么只需要切换node的版本即可。使用nvmnvs来做node版本的切换。

贡献者

The avatar of contributor named as ruan-cat ruan-cat
The avatar of contributor named as 阮中楠 阮中楠
The avatar of contributor named as 阮喵喵 阮喵喵
The avatar of contributor named as ruan-cat.台式机 ruan-cat.台式机
The avatar of contributor named as 阮中楠-台式电脑 阮中楠-台式电脑

页面历史