• 在执行npm install执行报错nodesass


    1 错误信息

      这个错误信息不是我当时的报错信息,是网上找的,报错的时候忘记存了,处理好了又找不到错误信息,就从网上找的差不多的错误信息

    gyp ERR! configure error
    gyp ERR! stack Error: Can't find Python executable "C:\Users\zhuon\AppData\Local\Programs\Python\Python36\python.EXE", you can set the PYTHON env variable.
    gyp ERR! stack   at PythonFinder.failNoPython (G:\Workspace\ManYan\manyan-nav\node_modules\node-gyp\lib\configure.js:483:19)
    gyp ERR! stack   at PythonFinder.<anonymous> (G:\Workspace\ManYan\manyan-nav\node_modules\node-gyp\lib\configure.js:508:16)
    gyp ERR! stack   at G:\Workspace\ManYan\manyan-nav\node_modules\graceful-fs\polyfills.js:284:29
    gyp ERR! stack   at FSReqWrap.oncomplete (fs.js:152:21)
    gyp ERR! System Windows_NT 10.0.15063
    gyp ERR! command "C:\\dev\\nodejs\\node.exe" "G:\\Workspace\\ManYan\\manyan-nav\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags="
    "--libsass_library="
    gyp ERR! cwd G:\Workspace\ManYan\manyan-nav\node_modules\node-sass
    gyp ERR! node -v v8.4.0
    gyp ERR! node-gyp -v v3.6.2
    gyp ERR! not ok
    Build failed
    npm WARN co-mocha@1.2.0 requires a peer of mocha@>=1.18 <4 but none was installed.
    npm WARN egg-restapi-module-tool@1.0.0 No repository field.
    npm WARN egg-restapi-module-tool@1.0.0 scripts['server'] should probably be scripts['start'].
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! node-sass@3.8.0 postinstall: `node scripts/build.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@3.8.0 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!   D:\nodejs\cache\_logs\2017-09-02T16_06_24_298Z-debug.log

     

    2 错误原因

      node-sass sass-loader nodejs版本不对应

    3 查看当前项目的版本

      打开package.json,搜索node,可以看到node-sass的版本

      

     

    4 版本对应关系

      

     

    5 根据项目的node-sass版本选择合适版本的nodejs

      我的是4.14.1,对应的nodejs版本是14,所以需要更换下nodejs的版本

      版本管理:https://www.cnblogs.com/jthr/p/16529620.html

     

  • 相关阅读:
    中国专利 相关
    GPU 编程相关 简要摘录
    RDMA 相关 简要摘录
    GO 使用 动态链接库(共享链接库)进行编译 生成动态链接可执行文件
    GO 使用静态链接库编译 生成可执行文件 使用第三方 .a 文件,无源码构造
    好用的性能检测工具-性能监控工具- Glances
    程序运行时间测试
    程序运行时间测试
    程序运行时间测试
    2019-11-29-WPF-绑定命令在-MVVM-的-CanExecute-和-Execute-在按钮点击都没触发可能的原因...
  • 原文地址:https://www.cnblogs.com/jthr/p/16529531.html
Copyright © 2020-2023  润新知