jaxgeller / npm-stats

stats for npm
MIT License
28 stars 0 forks source link

npm-stats syntax error in expression #1

Closed Eschon closed 8 years ago

Eschon commented 8 years ago

I've tried to run npm-stats after running a few npm commands and I get the following error:

-bash: 0+2015-11-02 16:00:15t4: syntax error in expression (error token is "16:00:15t4")

Additional Info: node version 5.0.0 npm version 3.3.6 OS: OSX 10.10.5

jaxgeller commented 8 years ago

Can you give me the output of bash --version? Also can you give me the output (if possible) of npm-stats raw? Thanks

jaxgeller commented 8 years ago

Try updating npm-stats now. cd ~/.npm-stats && git pull and refresh the shell.

Eschon commented 8 years ago

I tried updating but I still get the same error.

bash --version:

GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.

raw stats:

2015-11-02 16:00:15\t4
2015-11-02 16:00:32\t4
2015-11-02 16:00:45\t8
2015-11-02 16:01:34\t42
jaxgeller commented 8 years ago

I am sorry, I forgot to add that you'll need to get rid of the existing log file rm ~/.npm-stats/timing. The problem was that bash was escaping the tab character when it shouldn't have. So for now on it won't escape the tab, but the old occurrences of \t are still in the log file.

image

jaxgeller commented 8 years ago

Hey is this working for you now? May I close this issue?

Eschon commented 8 years ago

Works now thanks.