Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

启动报错 #23

Closed
yola-0316 opened this issue Jan 19, 2017 · 6 comments
Closed

启动报错 #23

yola-0316 opened this issue Jan 19, 2017 · 6 comments

Comments

@yola-0316
Copy link

[2017-01-19 11:10:53.086] [DEBUG] [default] - query url : http://127.0.0.1:9000/query
internal/child_process.js:289
  var err = this._handle.spawn(options);
                         ^

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:289:26)
    at exports.spawn (child_process.js:380:9)
    at Object.exports.execFile (child_process.js:143:15)
    at Object.<anonymous> (/Users/huangzhi/Service/badjs/badjs-installer/badjs-web/node_modules/node-highcharts-exporting/index.js:18:33)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
@loskael
Copy link
Member

loskael commented Jan 20, 2017

请提供 node 版本号等相关信息,初步判断是你使用的 node 版本太低了

@yola-0316
Copy link
Author

yola-0316 commented Jan 29, 2017

node 是 6.9.1 我一直用的是 LTS的最高版本。
是 badjs-web 模块的报错

========== badjs-web =========
[2017-01-29 22:41:34.056] [INFO] [default] - running in debug
express-session deprecated undefined resave option; provide resave option badjs-web/workflow/ExpressInitWorker.js:23:9
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option badjs-web/workflow/ExpressInitWorker.js:23:9
[2017-01-29 22:41:34.415] [INFO] [default] - connect mysql: mysql://root:root@localhost:32769/badjs
[2017-01-29 22:41:34.513] [INFO] [default] - starting mq ...
[2017-01-29 22:41:34.639] [INFO] [default] - create ProcessPool , number : 15
[2017-01-29 22:41:34.645] [INFO] [default] - start badjs-web , listen 8081 ...
(node:47285) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'
[2017-01-29 22:41:34.764] [INFO] [default] - mysql connected
[2017-01-29 22:41:37.651] [INFO] [default] - start Statistics  ...
[2017-01-29 22:41:37.651] [DEBUG] [default] - query url : http://127.0.0.1:9000/errorMsgTop
[2017-01-29 22:41:37.653] [INFO] [default] - after 11902.348s will fetch again
[2017-01-29 22:41:37.654] [DEBUG] [default] - query url : http://127.0.0.1:9000/query
internal/child_process.js:289
  var err = this._handle.spawn(options);
                         ^

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:289:26)
    at exports.spawn (child_process.js:380:9)
    at Object.exports.execFile (child_process.js:143:15)
    at Object.<anonymous> (/Users/huangzhi/Service/badjs/badjs-installer/badjs-web/node_modules/node-highcharts-exporting/index.js:18:33)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

@loskael
Copy link
Member

loskael commented Jan 29, 2017

@caihuiji
报错的地方是 https://github.com/caihuiji/node-highcharts-exporting/blob/1e4d5e82afbfa3dcac9c4d93d09a38b26c89849d/index.js#L18

因为 phantomjs.path 是 null,参考这个 issue: Medium/phantomjs#533

建议使用如下命令重新安装:

rm -rf node_modules
PHANTOMJS_CDNURL=http://npm.taobao.org/mirrors/phantomjs/ npm install

到这里这个问题已经解决,但是这里依赖的 https://github.com/caihuiji/node-highcharts-exporting 需要升级,参考:caihuiji/node-highcharts-exporting#5

@caihuiji
Copy link
Member

caihuiji commented Feb 5, 2017

已经增加检测和提示,
主要是国内下载 phantomjs 经常失败,造成 node-hightcharts-exporting 加载 phantomjs 失败

@caihuiji caihuiji closed this as completed Feb 5, 2017
@freefcw
Copy link

freefcw commented Jul 27, 2017

still appear this problem:

/data/web/badjs-web/node_modules/.0.0.9@node-highcharts-exporting/index.js:22
throw new Error("can no found phantomjs , see #23")
^

Error: can no found phantomjs , see #23
at Object. (/data/web/badjs-web/node_modules/.0.0.9@node-highcharts-exporting/index.js:22:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/data/web/badjs-web/service/EmailService.js:13:17)
at Module._compile (module.js:570:32)

$ uname -a
Linux srv120 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ node --version
v6.11.1

@gebilaoman
Copy link

依旧是报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants