Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

can't install doctorjs #55

Open
larryhe opened this issue Jun 29, 2013 · 11 comments
Open

can't install doctorjs #55

larryhe opened this issue Jun 29, 2013 · 11 comments

Comments

@larryhe
Copy link

larryhe commented Jun 29, 2013

as title said, when i run make install on my machine, it will fail as following: narcissus is empty. go to narcissus repository but found its file names are totally different from the ones listed below. any ideas??

install: cannot stat ‘narcissus/lib/jsbrowser.js’: No such file or directory
install: cannot stat ‘narcissus/lib/jsdecomp.js’: No such file or directory
install: cannot stat ‘narcissus/lib/jsdefs.js’: No such file or directory
install: cannot stat ‘narcissus/lib/jsdesugar.js’: No such file or directory
install: cannot stat ‘narcissus/lib/jsexec.js’: No such file or directory
install: cannot stat ‘narcissus/lib/jslex.js’: No such file or directory
install: cannot stat ‘narcissus/lib/jsparse.js’: No such file or directory
install: cannot stat ‘narcissus/lib/jsresolve.js’: No such file or directory
make: *** [install] Error 1

@larryhe
Copy link
Author

larryhe commented Jun 29, 2013

sorry. checking out the old version of narcissus fixes the problem.

@base698
Copy link

base698 commented Jul 26, 2013

Can you explain checking out narcissus? What is that?

@larryhe
Copy link
Author

larryhe commented Jul 26, 2013

1: go to docjs directory and git clone https://github.com/mozilla/narcissus.git
2: git checkout #commitid of that

@jplew
Copy link

jplew commented Aug 10, 2013

I'm getting a similar installation error:

[ 06:45:04 !498 ] $  make install
install -d /usr/local/bin
install: chmod 755 /usr/local/bin: Operation not permitted
install bin/jsctags.js /usr/local/bin/jsctags
install -d /usr/local/lib/jsctags
install lib/jsctags/getopt.js lib/jsctags/log.js lib/jsctags/paperboy.js lib/jsctags/traits.js lib/jsctags/underscore.js /usr/local/lib/jsctags
install -d /usr/local/lib/jsctags/ctags
install lib/jsctags/ctags/index.js lib/jsctags/ctags/interp.js lib/jsctags/ctags/nativefn.js lib/jsctags/ctags/reader.js lib/jsctags/ctags/writer.js /usr/local/lib/jsctags/ctags
install -d /usr/local/lib/cfa2
install lib/cfa2/index.js lib/cfa2/jscfa.js /usr/local/lib/cfa2
install -d /usr/local/narcissus
install -d /usr/local/narcissus/lib
install narcissus/lib/../main.js narcissus/lib/decompiler.js narcissus/lib/definitions.js narcissus/lib/desugaring.js narcissus/lib/jsbrowser.js narcissus/lib/jsdecomp.js narcissus/lib/jsdefs.js narcissus/lib/jsdesugar.js narcissus/lib/jsexec.js narcissus/lib/jslex.js narcissus/lib/jsparse.js narcissus/lib/jsresolve.js narcissus/lib/lexer.js narcissus/lib/parser.js /usr/local/narcissus/lib
install: narcissus/lib/../main.js: No such file or directory
make: *** [install] Error 71

As per your suggestion I did this:
git clone https://github.com/mozilla/narcissus.git

Now that I have Narcissus, which old version am I supposed to checkout? There are so many old commits. Here is the error when I try to make serve:

[ 06:56:56 !507 ] $  make serve
node serve.js

Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
    at Function.Object.defineProperty.get (module.js:388:11)
    at Object.<anonymous> (/Users/jkirtan/Documents/github/doctorjs/serve.js:39:8)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
make: *** [serve] Error 8

And when I jsctags, I get this:
Error: Cannot find module '../../../narcissus/lib/parser'

@omrihar
Copy link

omrihar commented Sep 8, 2013

@larryhe
Hi Larry,
I'm also experiencing the same problem. Can you tell us which commitid of
narcissus fixes the issue for you?

Thanks!

@larryhe
Copy link
Author

larryhe commented Sep 8, 2013

@omrihar 4ae5aff

@phux
Copy link

phux commented Sep 24, 2013

That commit id won't do it. The narcissus dir is empty because it's a git submodule dir. you have to init that to get the latest version (that works) (to be explizit: commit id #4ae5aff8b3c9bc76eef557b9a769813bdf1e2741 ... but just init should be enough!),
Here is the complete installation procedure:

git clone https://github.com/mozilla/doctorjs.git
cd doctorjs
git submodule update --init --recursive

then a

sudo make install

will work.

@simianarmy
Copy link

Can you add those instructions to the README so people who use the repo home page don't have to scroll through issue after issue to find the solution?
Also, if you download via Zip, you can't even use the git submodule step.

@shihshen
Copy link

You can also try Tern.js (http://ternjs.net/).

@kristopolous
Copy link

@Powpow-Shen why should I do ternjs? It's not a challenge ... I'm trying to be educated here. Thanks.

@shihshen
Copy link

It's been a long time from last time I used doctorjs. But if I remembered correctly, doctorjs doesn't build the index very well. It's not easy to find the definitions of functions with the help of doctorjs. And ternjs isn't doing perfect too. But ternjs is still improving, and doctorjs had stopped.

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

No branches or pull requests

8 participants