npm 安裝 uirecorder 報錯 Unexpected token

Mark發表於2021-01-11

npm 安裝 uirecorder,報錯:

renzhicheng:node_modules renzhicheng$ npm i uirecorder -g
npm WARN deprecated request@2.79.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@2.0.6: this library is no longer supported
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

typechecker@2.0.8 preinstall /usr/local/lib/node_modules/uirecorder/node_modules/extract-opts/node_modules/typechecker
node ./cyclic.js

typechecker@2.0.8 preinstall /usr/local/lib/node_modules/uirecorder/node_modules/extendr/node_modules/typechecker
node ./cyclic.js

/usr/local/bin/uirecorder -> /usr/local/lib/node_modules/uirecorder/bin/uirecorder

chromedriver@87.0.5 install /usr/local/lib/node_modules/uirecorder/node_modules/chromedriver
node install.js

/usr/local/lib/node_modules/uirecorder/node_modules/globby/index.js:28
} catch {
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/uirecorder/node_modules/del/index.js:4:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@87.0.5 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@87.0.5 install 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! /Users/renzhicheng/.npm/_logs/2021-01-11T08_27_51_977Z-debug.log

我的環境:
macaca-doctor version: 2.0.18

Node.js checklist:

node env: /usr/local/bin/node
node version: v8.11.1

iOS checklist:

macOS version: 10.14.6
Xcode Command Line Tools is ready, version: 2354.
xcodebuild version: 11.3
iproxy[usbmuxd] is installed at: /opt/local/bin/iproxy
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

Android checklist:

JAVA version is 1.8
JAVA_HOME is set to /Library/java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
ANDROID_HOME is set to /Users/renzhicheng/Library/Android/sdk
Platforms is set to /Users/renzhicheng/Library/Android/sdk/platforms/android-30
ADB tool is set to /Users/renzhicheng/Library/Android/sdk/platform-tools/adb
gradle is installed, version: 6.8

Installed driver list:

android: 2.2.1
location: /usr/local/lib/node_modules/macaca-android

ios: 2.1.0
location: /usr/local/lib/node_modules/macaca-ios

相關文章