Я хочу установить пакет 'wdio-jasmine-framework' с помощью команды 'npm i wdio-jasmine-framework --save-dev', но я получаю это сообщение об ошибке. Я уже пытался удалить глобальный пакет 'node-gyp'. Я проверил, готов ли мой Mac OS к этому, с https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md, а также попробовал это здесь https://github.com/nodejs/node-gyp. Все еще не работает. Node version 13.0.1, npm version 6.12.0.
Я только что попробовал пройти этот урок https://medium.com/the-web-tub/testing-cordova-apps-with-appium-2b3b236e026b
ps: я новичок во внешнем интерфейсе
packag.json
"name": "APPNAME-mobile-integration-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "wdio tests/wdio.conf.js",
"appium": "appium",
"appium-doctor": "appium-doctor"
},
"keywords": [],
"author": "XXX XXX",
"license": "ISC",
"devDependencies": {
"appium": "^1.15.1",
"appium-doctor": "^1.12.1",
"core-js": "^3.3.6",
"wdio-appium-service": "^0.2.3",
"wdio-jasmine-framework": "^0.3.8",
"wdio-spec-reporter": "^0.1.5",
"webdriverio": "^5.15.6"
}
}
Сообщение об ошибке
> node build.js || nodejs build.js
CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:68:2: error: no template named 'Handle'
Handle<String> NewLatin1String(Isolate* isolate, const char* string) {
^
../src/fibers.cc:69:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:72:2: error: no template named 'Handle'
Handle<String> NewLatin1Symbol(Isolate* isolate, const char* string) {
^
../src/fibers.cc:73:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:94:2: error: no template named 'Handle'
Handle<Object> NewInstance(Isolate* isolate, Local<Function> fn, int argc, Local<Value> argv[]) {
^
../src/fibers.cc:95:10: error: no viable conversion from returned value of type 'Local<v8::Object>' to function return type 'int'
return fn->NewInstance(isolate->GetCurrentContext(), argc, argv).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:104:2: error: no template named 'Handle'
Handle<Number> ToNumber(Local<Value> value) {
^
../src/fibers.cc:105:10: error: no viable conversion from returned value of type 'Local<v8::Number>' to function return type 'int'
return value->ToNumber(Isolate::GetCurrent()->GetCurrentContext()).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:114:50: error: no template named 'Handle'
Local<Value> GetStackTrace(TryCatch* try_catch, Handle<Context> context) {
^
../src/fibers.cc:127:39: error: no template named 'Handle'
void fixStackLimit(Isolate* isolate, Handle<Context> context) {
^
../src/fibers.cc:149:58: error: no template named 'Handle'
void Reset(Isolate* isolate, Persistent<T>& persistent, Handle<T> handle) {
^
../src/fibers.cc:162:7: error: variable has incomplete type 'void'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:26: error: use of undeclared identifier 'Handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:33: error: 'T' does not refer to a value
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:161:18: note: declared here
template <class T>
^
../src/fibers.cc:162:36: error: use of undeclared identifier 'handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:48: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~ ^
../src/fibers.cc:162:59: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~~^
../src/fibers.cc:162:61: error: use of undeclared identifier 'val'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:65: error: expected ';' at end of declaration
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/XXX/.nvm/versions/node/v13.0.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/Users/XXX/.nvm/versions/node/v13.0.1/bin/node" "/Users/XXX/.nvm/versions/node/v13.0.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/XXX/Documents/APPNAME/APP-mobile-integration-test/node_modules/wdio-sync/node_modules/fibers
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v5.0.5
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`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm WARN APP-mobile-integration-test@1.0.0 No description
npm WARN APP-mobile-integration-test@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! fibers@3.1.1 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@3.1.1 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/XXX/.npm/_logs/2019-11-01T11_40_02_099Z-debug.log```