[原创]异常报错 npm rebuild node-sass` to build the binding for your current node version

遇到一个node版本过低导致的问题,项目是个老项目,本地一直跑不起来,后来才发现是本地node版本过高导致,编译过程中有下面的异常报错。
解决方法:只需要把node切换成项目匹配的版本即可。
推荐:node管理工具nvm

Module build failed: Error: The `libsass` binding was not found in F:\work\cunqi                                                                                            ngfms\fas\fas-frontend\node_modules\node-sass\vendor\win32-x64-64\binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.
    at Object.sass.getBinaryPath (F:\work\cunqingfms\fas\fas-frontend\node_modul                                                                                            es\node-sass\lib\extensions.js:158:11)
    at Object. (F:\work\cunqingfms\fas\fas-frontend\node_modules\node                                                                                            -sass\lib\index.js:16:36)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object. (F:\work\cunqingfms\fas\fas-frontend\node_modules\sass                                                                                            -loader\index.js:4:12)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)

你可能感兴趣的:(前端学习资料,前端学习总结)