Open mengbin890815 opened 3 years ago
This is the translated issue:
Win10 runs NOSMoke -u R3CN70MKHYE-C: \ 1_uhome \ 2_project \ 9_nosmoke \ NOSMOKE \ DEMO \ CRAWLER.CONFIG.YML error is as follows:
UDID: R3CN70MKHYEEEEEE
ReferenceError: root is not defined
AT NSCRAWLERCONFIG.LOADDEFAULT (D: \ Programs \ NodeJs \ Node_Global \ Node_Modules \ NOSMOKE \ LIB \ Crawler \ config.js: 40: 3)
At Object.
LIB \ crawler \ config.js: 40: 3 in this file
Nscrawlerconfig.prototype.loadDefault = function () { Let configfile = path.join (_ dirname, '..', '..', 'demo', 'crawler.config.yml'); IF (Root.cmdargs && Root.cmdargs.config) { IF (.isexistedfile (root.cmdargs.config) { CONFIGFILE = root.cmdargs.config; } else { Console.log ('Invalid Config File Paths:' + Root.cmdargs.config); Process.exit (); } } root is not defined? ? ?
win10 运行 nosmoke -u R3CN70MKHYE -c D:\1_UHome\2_project\9_nosmoke\NoSmoke\demo\crawler.config.yml报错如下: udid: R3CN70MKHYE ReferenceError: root is not defined at NSCrawlerConfig.loadDefault (D:\Programs\nodejs\node_global\node_modules\nosmoke\lib\crawler\config.js:40:3) at Object. (D:\Programs\nodejs\node_global\node_modules\nosmoke\lib\crawler\index.js:13:15)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at module.exports (D:\Programs\nodejs\node_global\node_modules\nosmoke\lib\nosmoke.js:37:11)
at module.exports.next ()
lib\crawler\config.js:40:3 这个文件中
NSCrawlerConfig.prototype.loadDefault = function() { let configFile = path.join(_dirname, '..', '..', 'demo', 'crawler.config.yml'); if (root.cmdArgs && root.cmdArgs.config) { if (.isExistedFile(root.cmdArgs.config)) { configFile = root.cmdArgs.config; } else { console.log('invalid config file paths :' + root.cmdArgs.config); process.exit(); } } root 没定义???