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:\Python27\python.exe --global

5. npm config set msvs_version 2015 --global

重启电脑再打开