zoukankan      html  css  js  c++  java
  • yarn start 启动项目报错 Command failed. Exit code: 127 Command: node build.js || nodejs build.js

    error /Users/admin/Desktop/workspace/xxxxx/xx/xxxx/task-platform1/node_modules/fibers: Command failed.
    Exit code: 127
    Command: node build.js || nodejs build.js
    Arguments:
    Directory: /Users/admin/Desktop/workspace/xxxxx/xx/xxxx/task-platform1/node_modules/fibers
    Output:
    gyp info it worked if it ends with ok
    gyp info using node-gyp@5.1.0
    gyp info using node@14.15.5 | darwin | x64
    gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
    gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
    gyp info spawn args [
    gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    gyp info spawn args 'binding.gyp',
    gyp info spawn args '-f',
    gyp info spawn args 'make',
    gyp info spawn args '-I',
    gyp info spawn args '/Users/admin/Desktop/workspace/xxxxxx/xxx/xxxxx/task-platform1/node_modules/fibers/build/config.gypi',
    gyp info spawn args '-I',
    gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    gyp info spawn args '-I',
    gyp info spawn args '/Users/admin/Library/Caches/node-gyp/14.15.5/include/node/common.gypi',
    gyp info spawn args '-Dlibrary=shared_library',
    gyp info spawn args '-Dvisibility=default',
    gyp info spawn args '-Dnode_root_dir=/Users/admin/Library/Caches/node-gyp/14.15.5',
    gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
    gyp info spawn args '-Dnode_lib_file=/Users/admin/Library/Caches/node-gyp/14.15.5/<(target_arch)/node.lib',
    gyp info spawn args '-Dmodule_root_dir=/Users/admin/Desktop/workspace/xxxxx/xx/xxxx/task-platform1/node_modules/fibers',
    gyp info spawn args '-Dnode_engine=v8',
    gyp info spawn args '--depth=.',
    gyp info spawn args '--no-parallel',
    gyp info spawn args '--generator-output',
    gyp info spawn args 'build',
    gyp info spawn args '-Goutput_dir=.'
    gyp info spawn args ]
    No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

    No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

    No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

    gyp: No Xcode or CLT version detected!
    gyp ERR! configure error
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
    gyp ERR! stack at ChildProcess.emit (events.js:315:20)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
    gyp ERR! System Darwin 19.6.0
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
    gyp ERR! cwd /Users/admin/Desktop/workspace/xxxxx/xxx/xxxxx/task-platform1/node_modules/fibers
    gyp ERR! node -v v14.15.5
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok
    node-gyp exited with code: 1
    Please make sure you are using a supported platform and node version. If you
    would like to compile fibers on this machine please make sure you have setup your
    build environment--
    Windows + OS X instructions here: https://github.com/nodejs/node-gyp
    Ubuntu users please run: `sudo apt-get install g++ build-essential`


    error Command failed with exit code 127.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    解决方案:

    2. Install Python 2.7, and add it to your PATH
    
    3. npm config set python python2.7 --global
    
    4. npm config set python C:Python27python.exe --global
    
    5. npm config set msvs_version 2015 --global

    重启电脑再打开

    不积跬步无以至千里
  • 相关阅读:
    (转)接口100
    (转)WordPress常用模板函数 修改或自制WordPress主题必备
    (转)Memcached 之 .NET(C#)实例分析
    Ubuntu(Linux) + mono + xsp4 + nginx +asp.net MVC3 部署
    urls.py路由系统分发的本质
    Django-缓存
    Django-信号
    MySQL表按月切割
    通过ModelForm实现主机添加和编辑
    字定义JSON序列化支持datetime格式序列化
  • 原文地址:https://www.cnblogs.com/lyt0207/p/14542547.html
Copyright © 2011-2022 走看看