在appium运行时未捕获的异常(appium-14.1.16)
我在Ubuntu上运行appium 1.4.1.16。开始使用以下命令appium服务器后:在appium运行时未捕获的异常(appium-14.1.16)
appium &
我得到以下未捕获的异常:
error: uncaughtException: Cannot find module 'internal/fs' date=Sun Feb 26 2017 13:08:48 GMT+0600 (BDT), pid=18190, uid=1000, gid=1000, cwd=/home/pc/.linuxbrew/lib/node_modules/appium, execPath=/home/pc/.linuxbrew/Cellar/node/7.5.0/bin/node, version=v7.5.0, argv=[/home/pc/.linuxbrew/Cellar/node/7.5.0/bin/node, /home/pc/.linuxbrew/bin/appium], rss=99041280, heapTotal=79945728, heapUsed=46807408, external=204307, loadavg=[0.67529296875, 0.73681640625, 0.74658203125], uptime=3424, trace=[column=15, file=module.js, function=Function.Module._resolveFilename, line=470, method=Module._resolveFilename, native=false, column=25, file=module.js, function=Function.Module._load, line=418, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=498, method=require, native=false, column=19, file=internal/module.js, function=require, line=20, method=null, native=false, column=20, file=evalmachine., function=null, line=18, method=null, native=false, column=1, file=/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/node_modules/graceful-fs/fs.js, function=, line=11, method=null, native=false, column=32, file=module.js, function=Module._compile, line=571, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=580, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=488, method=load, native=false, column=12, file=module.js, function=tryModuleLoad, line=447, method=null, native=false, column=3, file=module.js, function=Function.Module._load, line=439, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=498, method=require, native=false, column=19, file=internal/module.js, function=require, line=20, method=null, native=false, column=27, file=/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js, function=, line=3, method=null, native=false, column=32, file=module.js, function=Module._compile, line=571, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=580, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=488, method=load, native=false, column=12, file=module.js, function=tryModuleLoad, line=447, method=null, native=false, column=3, file=module.js, function=Function.Module._load, line=439, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=498, method=require, native=false, column=19, file=internal/module.js, function=require, line=20, method=null, native=false, column=10, file=/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/lib/reader.js, function=, line=4, method=null, native=false, column=32, file=module.js, function=Module._compile, line=571, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=580, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=488, method=load, native=false, column=12, file=module.js, function=tryModuleLoad, line=447, method=null, native=false, column=3, file=module.js, function=Function.Module._load, line=439, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=498, method=require, native=false, column=19, file=internal/module.js, function=require, line=20, method=null, native=false, column=18, file=/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/fstream.js, function=, line=2, method=null, native=false, column=32, file=module.js, function=Module._compile, line=571, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=580, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=488, method=load, native=false, column=12, file=module.js, function=tryModuleLoad, line=447, method=null, native=false], stack=[Error: Cannot find module 'internal/fs', at Function.Module._resolveFilename (module.js:470:15), at Function.Module._load (module.js:418:25), at Module.require (module.js:498:17), at require (internal/module.js:20:19), at evalmachine.:18:20, at Object. (/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1), at Module._compile (module.js:571:32), at Object.Module._extensions..js (module.js:580:10), at Module.load (module.js:488:32), at tryModuleLoad (module.js:447:12), at Function.Module._load (module.js:439:3), at Module.require (module.js:498:17), at require (internal/module.js:20:19), at Object. (/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:3:27), at Module._compile (module.js:571:32), at Object.Module._extensions..js (module.js:580:10), at Module.load (module.js:488:32), at tryModuleLoad (module.js:447:12), at Function.Module._load (module.js:439:3), at Module.require (module.js:498:17), at require (internal/module.js:20:19), at Object. (/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/lib/reader.js:4:10), at Module._compile (module.js:571:32), at Object.Module._extensions..js (module.js:580:10), at Module.load (module.js:488:32), at tryModuleLoad (module.js:447:12), at Function.Module._load (module.js:439:3), at Module.require (module.js:498:17), at require (internal/module.js:20:19), at Object. (/home/pc/.linuxbrew/lib/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/fstream.js:2:18), at Module._compile (module.js:571:32), at Object.Module._extensions..js (module.js:580:10), at Module.load (module.js:488:32), at tryModuleLoad (module.js:447:12)]
看起来你已经在Linux中使用BREW安装的节点。建议直接下载节点,然后解压缩并将bin文件夹添加到您的路径。使用bin文件夹中的npm
安装appium npm install -g appium
。