花了两个小时才解决
首先是从git上克隆项目到本地,然后安装nodele_modules,输入npm i安装
安装到一半报错
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
这个问题不是第一次遇到了,两周前就遇到过一次,当时百度了一圈没有解决,各种方法都试了,就是解决不了。
没办法,只好把同事安装好的项目整个打包复制过来,今天因为要安装新的插件,结果又报这个错,没办法,这次必须得解决这个问题了。
看到一篇文章,很受用,就是跟着文章的思路找到解决的办法
Failed at the node-sass@4.14.1 postinstall script.(第二次入坑)
简短描述,就是node的版本太高,现在官网上直接下载的版本已经是16.14.2