Giter Club home page Giter Club logo

Comments (24)

hustcer avatar hustcer commented on May 24, 2024

你node安装成功了么?输入的什么命令?

from star.

zhang406 avatar zhang406 commented on May 24, 2024

node 安装成功了
root@public:/usr/local/bin# node -v
v0.12.7
root@public:/usr/local/bin# which node
/usr/local/bin/node
直接输入 命令 star 请大神帮忙解决啊。
root@public:/usr/local/bin# star
/usr/bin/env: node --harmony: No such file or directory

from star.

zhang406 avatar zhang406 commented on May 24, 2024

有mail,qq或者其他的联系方式吗?想让你指导安装一下。谢谢,或者你加我qq 344826638 ,谢谢,本人做系统运维,可以做些技术交流。

from star.

hustcer avatar hustcer commented on May 24, 2024

看看这里有类似的问题,把/usr/local/bin/加到你的PATH里面试试看,或者试试:ln -s /usr/local/bin/node /usr/bin/node

from star.

hustcer avatar hustcer commented on May 24, 2024

@zhang406 可以了么?

from star.

zhang406 avatar zhang406 commented on May 24, 2024

谢谢你给的链接,这些方式在求助你之前都已经尝试了,还是不行

from star.

zhang406 avatar zhang406 commented on May 24, 2024

我想问一下,我编译安装的node v0.12.7 ,你代码具体需要node的那些特性,有没有具体安装star的文档,谢谢支持。

from star.

hustcer avatar hustcer commented on May 24, 2024

需要node 支持 es6,你可以试下其他电脑安装是不是有问题?或者换其他版本的node,0.12以上都可以试试,用 nvm 管理node会比较方便。或者试下io.js不过io.js我没试过,你用的什么系统呢?

from star.

hustcer avatar hustcer commented on May 24, 2024

star具体安装就在readme里面,已经比较详细了。或者你可以把代码克隆下来安装试试。

from star.

zhang406 avatar zhang406 commented on May 24, 2024

我在Ubuntu 和centos系统上都试了,都是报同样的错误,那我再换一下稍低一个版本的node试一下。

from star.

hustcer avatar hustcer commented on May 24, 2024

你可以试下从源码安装使用:

  1. 您还需要安装 git, 之后 clone star源码:git clone [email protected]:hustcer/star.git;
  2. star目录下安装依赖的 node 模块: sudo npm install;
  3. 运行star: ./star.js,第一次运行的时候需要加-f--file参数指定股票数据文件(推荐采用绝对路径),之后可以省略该参数;
  4. 更多帮助可以参考: ./star.js --help;

然后给 star.js 建个快捷方式

from star.

hustcer avatar hustcer commented on May 24, 2024

README.md 里面 加了“从源码安装”部分

from star.

zhang406 avatar zhang406 commented on May 24, 2024

#git clone https://github.com/hustcer/star.git
Initialized empty Git repository in /root/star/.git/
remote: Counting objects: 679, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 679 (delta 2), reused 0 (delta 0), pack-reused 67
Receiving objects: 100% (679/679), 1.50 MiB | 229 KiB/s, done.
Resolving deltas: 100% (442/442), done.
[root@nfs ]# ls
anaconda-ks.cfg drop_caches
lnmp-install.log pear shutdown_tomcat.sh~ swoole vhost.sh
beanstalkd_binlog install.log logs phpconf star test webapps
data install.log.syslog mysql_all_backup20150114.sql redis.xml star-master tomact xf9-app-service.war
download lnmp mysql_upgrade20150114.log scripts star-master.zip typescript
[root@nfs ~]# cd star
[root@nfs star]# ls
bin eslint.json Gruntfile.js history.md lib LICENSE package.json README.md snapshot star.js symbols.yaml

[root@nfs star]# npm install

[email protected] install /root/star/node_modules/iconv
node-gyp rebuild

make: Entering directory /root/star/node_modules/iconv/build' CC(target) Release/obj.target/libiconv/deps/libiconv/lib/iconv.o AR(target) Release/obj.target/iconv.a COPY Release/iconv.a CXX(target) Release/obj.target/iconv/src/binding.o SOLINK_MODULE(target) Release/obj.target/iconv.node SOLINK_MODULE(target) Release/obj.target/iconv.node: Finished COPY Release/iconv.node make: Leaving directory/root/star/node_modules/iconv/build'
[email protected] node_modules/printf

[email protected] node_modules/colors

[email protected] node_modules/async

[email protected] node_modules/commander
└── [email protected]

[email protected] node_modules/numeral

[email protected] node_modules/bluebird

[email protected] node_modules/js-yaml
├── [email protected]
└── [email protected] ([email protected])

[email protected] node_modules/cheerio
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])

[email protected] node_modules/blessed

[email protected] node_modules/request
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected])

[email protected] node_modules/lodash

[email protected] node_modules/grunt
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])

[email protected] node_modules/moment

[email protected] node_modules/blessed-contrib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])

[email protected] node_modules/grunt-eslint
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

[email protected] node_modules/iconv
└── [email protected]
[root@nfs star]# ./star.js
/usr/bin/env: node --harmony: No such file or directory

还是这个问题,我哪里少步骤了吗?

from star.

hustcer avatar hustcer commented on May 24, 2024

有两种办法:

  1. 把star.js里面的#! /usr/bin/env node --harmony改成 #!/usr/local/bin/node --harmony,然后执行./star.js;
  2. 或者不做修改,直接执行node ./star.js,前面始终加上node;

你试试看

from star.

zhang406 avatar zhang406 commented on May 24, 2024

终于可以了,一直没发现是这个地方,非常感激。

from star.

hustcer avatar hustcer commented on May 24, 2024

不客气,这种问题是比较诡异

from star.

zhang406 avatar zhang406 commented on May 24, 2024

这些数据来自sina 与腾讯,也仅仅做参考,不过,开发这样的程序,挺牛b的。

from star.

zhang406 avatar zhang406 commented on May 24, 2024

{ [Error: getaddrinfo ENOTFOUND qt.gtimg.cn]
cause:
{ [Error: getaddrinfo ENOTFOUND qt.gtimg.cn]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'qt.gtimg.cn' },
isOperational: true,
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'qt.gtimg.cn' }

你qt.gtimg.cn 是不是出问题了?

from star.

hustcer avatar hustcer commented on May 24, 2024

那是腾讯股票数据接口问题,你可以试试 -d sina 参数,是外部接口问题

from star.

zhang406 avatar zhang406 commented on May 24, 2024

你那正常吗?

from star.

hustcer avatar hustcer commented on May 24, 2024

当然正常

from star.

lwldcr avatar lwldcr commented on May 24, 2024

bruce@Air™ ~/Downloads/star (master) $$ ./star.js -f test
module.js:489
throw err;
^
SyntaxError: /Users/bruce/.star.json: Unexpected end of input
at Object.parse (native)
at Object.Module.extensions..json (module.js:486:27)
at Module.load (module.js:355:32)
at Function.Module.load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.Common.getSymbolFilePath (/Users/bruce/Downloads/star/lib/common.js:62:38)
at Object.
.filter.
.filter..filter..filter.syms as getFilteredSymbols
at Object.actions.TRACE (/Users/bruce/Downloads/star/star.js:112:29)
at doCmd (/Users/bruce/Downloads/star/star.js:145:20)
at Object. (/Users/bruce/Downloads/star/star.js:149:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
bruce@Air™ ~/Downloads/star (master) $$ node -v
v0.12.7

mac 里面跑不起来

from star.

hustcer avatar hustcer commented on May 24, 2024

mac下可以的,我用的就是mac,你股票数据文件指定有问题,要用绝对路径,不能用相对路径。你可以把这个文件:/Users/bruce/.star.json删掉,然后重新指定下路径试试

from star.

hustcer avatar hustcer commented on May 24, 2024

@lwldcr 可以了么?

from star.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.