Creating a new React app in /Library/first-demo.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code 1
npm ERR! path /Library/first-demo/node_modules/bufferutil
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR!
npm ERR! Traceback (most recent call last):
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1500, in XcodeVersion
npm ERR! version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1563, in GetStdoutQuiet
npm ERR! raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
npm ERR! gyp.common.GypError: Error 1 running xcodebuild
npm ERR!
npm ERR! During handling of the above exception, another exception occurred:
npm ERR!
npm ERR! Traceback (most recent call last):
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
npm ERR! return gyp_main(args)
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 647, in gyp_main
npm ERR! generator.GenerateOutput(flat_list, targets, data, params)
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2451, in GenerateOutput
npm ERR! writer.Write(
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 831, in Write
npm ERR! self.WriteSources(
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1302, in WriteSources
npm ERR! cflags = self.xcode_settings.GetCflags(
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 661, in GetCflags
npm ERR! archs = self.GetActiveArchs(self.configname)
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 515, in GetActiveArchs
npm ERR! xcode_archs_default = GetXcodeArchsDefault()
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 122, in GetXcodeArchsDefault
npm ERR! xcode_version, _ = XcodeVersion()
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1511, in XcodeVersion
npm ERR! version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1549, in CLTVersion
npm ERR! return re.search(regex, output).groupdict()["version"]
npm ERR! AttributeError: 'NoneType' object has no attribute 'groupdict'
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Library/first-demo/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:327:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
npm ERR! gyp ERR! System Darwin 19.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Library/first-demo/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Library/first-demo/node_modules/bufferutil
npm ERR! gyp ERR! node -v v15.0.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/liangjiahao/.npm/_logs/2021-03-10T08_24_35_501Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting first-demo/ from /Library
Done.
https://blog.csdn.net/weisubao/article/details/105464662
liangjiahao@Aaron-3 /Library % sudo create-react-app first-demo
Password:
Creating a new React app in /Library/first-demo.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code 1
npm ERR! path /Library/first-demo/node_modules/bufferutil
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR!
npm ERR! Traceback (most recent call last):
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1500, in XcodeVersion
npm ERR! version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines()
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1563, in GetStdoutQuiet
npm ERR! raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
npm ERR! gyp.common.GypError: Error 1 running xcodebuild
npm ERR!
npm ERR! During handling of the above exception, another exception occurred:
npm ERR!
npm ERR! Traceback (most recent call last):
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
npm ERR! return gyp_main(args)
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 647, in gyp_main
npm ERR! generator.GenerateOutput(flat_list, targets, data, params)
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2451, in GenerateOutput
npm ERR! writer.Write(
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 831, in Write
npm ERR! self.WriteSources(
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1302, in WriteSources
npm ERR! cflags = self.xcode_settings.GetCflags(
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 661, in GetCflags
npm ERR! archs = self.GetActiveArchs(self.configname)
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 515, in GetActiveArchs
npm ERR! xcode_archs_default = GetXcodeArchsDefault()
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 122, in GetXcodeArchsDefault
npm ERR! xcode_version, _ = XcodeVersion()
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1511, in XcodeVersion
npm ERR! version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
npm ERR! File "/Library/first-demo/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1549, in CLTVersion
npm ERR! return re.search(regex, output).groupdict()["version"]
npm ERR! AttributeError: 'NoneType' object has no attribute 'groupdict'
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Library/first-demo/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:327:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
npm ERR! gyp ERR! System Darwin 19.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Library/first-demo/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Library/first-demo/node_modules/bufferutil
npm ERR! gyp ERR! node -v v15.0.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/liangjiahao/.npm/_logs/2021-03-10T09_41_13_748Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting first-demo/ from /Library
Done.
升级下python? 怎么联系你