首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装wdio-

无法安装wdio-
EN

Stack Overflow用户
提问于 2019-11-01 11:53:01
回答 2查看 915关注 0票数 1

我想用'npm -save‘命令安装’‘包,但是我得到了这个错误消息。我已经试着删除了全局的‘node’包。我检查了我的mac os是否已经准备好使用https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md,并在这里试用了https://github.com/nodejs/node-gyp。还是不起作用。节点版本13.0.1,npm版本6.12.0。

我只是试着复习一下这个教程https://medium.com/the-web-tub/testing-cordova-apps-with-appium-2b3b236e026b

ps:我是新来的新手

packag.json

代码语言:javascript
复制
  "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"
  }
}

错误消息

代码语言:javascript
复制
> 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```
EN

回答 2

Stack Overflow用户

发布于 2019-11-01 11:58:50

尝试删除package-lock.json并重新运行npm安装

票数 0
EN

Stack Overflow用户

发布于 2019-11-01 15:36:50

溶液

我不明白这个奇怪的版本,但我现在用:

"wdio-jasmine-framework": "^5.0.0-beta.3"

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58658806

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档