解决node sass和node版本兼容性的问题

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lyp\AppData\Roaming\npm-cache\_logs\2024-01-28T03_51_57_936Z-debug.log
 

这个一看就是node版本兼容性导致的问题
node-sass与node版本不匹配
下面是常见的node版本和对应的node-sass版本 

解决node sass和node版本兼容性的问题_第1张图片

本系统上windows64 所以我把node的版本降为 node14 然后使用了node sass 5.0就成功解决了这个问题 

npm install [email protected]

你可能感兴趣的:(日常开发问题,sass,rust,前端)