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

"tree match failed" error #3

Open
wong2 opened this issue Apr 24, 2012 · 8 comments
Open

"tree match failed" error #3

wong2 opened this issue Apr 24, 2012 · 8 comments

Comments

@wong2
Copy link

wong2 commented Apr 24, 2012

At first, I met the error in #1 , then I tried to install the eyes module by myself with sudo npm install -g eyes, then I run this command krasota -i test.js -b krasota/lib/beautifiers/split-vars and get this error:

/usr/local/lib/node_modules/krasota/lib/krasota.js:47
    throw e
          ^
tree match failed

after you fixed #1, I use sudo npm uninstall -g krasota to unintall the installed package, fetch and merge the code from github, then run sudo npm install -g in the directory of my local clone of krasota, then run krasota -i test.js -b krasota/lib/beautifiers/split-vars again, but I still get the error.

I also tried to install krasota with sudo npm install -g krasota, it doesn't work either.

@veged
Copy link
Owner

veged commented Apr 24, 2012

Can you please provide full content of your test.js file?
Also, if you have local clone, can you run npm install && make tests in working copy?

On 24.04.2012, at 17:13, [email protected] wrote:

At first, I met the error in #1 , then I tried to install the eyes module by myself with sudo npm install -g eyes, then I run this command krasota -i test.js -b krasota/lib/beautifiers/split-vars and get this error:

/usr/local/lib/node_modules/krasota/lib/krasota.js:47
throw e
^
tree match failed

after you fixed #1, I use sudo npm uninstall -g krasota to unintall the installed package, fetch and merge the code from github, then run sudo npm install -g in the directory of my local clone of krasota, then run krasota -i test.js -b krasota/lib/beautifiers/split-vars again, but I still get the error.

I also tried to install krasota with sudo npm install -g krasota, it doesn't work either.


Reply to this email directly or view it on GitHub:
#3

@wong2
Copy link
Author

wong2 commented Apr 25, 2012

I cloned the repo with git clone https://github.com/veged/krasota.js.git, then I cd into krasota.js, run npm install, then I run make tests, this is the result:

module.js:332
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'krasota/lib/beautifiers/always-semicolons'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at /home/wong2/codes/js/krasota/tests/tests.js:21:28
at Array.map (native)
at /home/wong2/codes/js/krasota/tests/tests.js:20:18
at [object Object]. (fs.js:115:5)
at [object Object].emit (events.js:64:17)
at afterRead (fs.js:1117:12)
make: *** [tests/always-semicolons] Error 1

@veged
Copy link
Owner

veged commented Apr 25, 2012

you need also run npm link in working copy, because of using global paths for beautifiers in tests :-( i will fix it later

On 25.04.2012, at 7:24, [email protected] wrote:

I cloned the repo with git clone https://github.com/veged/krasota.js.git, then I cd into krasota.js, run npm install, then I run make tests, this is the result:

module.js:332
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'krasota/lib/beautifiers/always-semicolons'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at /home/wong2/codes/js/krasota/tests/tests.js:21:28
at Array.map (native)
at /home/wong2/codes/js/krasota/tests/tests.js:20:18
at [object Object]. (fs.js:115:5)
at [object Object].emit (events.js:64:17)
at afterRead (fs.js:1117:12)
make: *** [tests/always-semicolons] Error 1


Reply to this email directly or view it on GitHub:
#3 (comment)

@wong2
Copy link
Author

wong2 commented Apr 25, 2012

I tried to run sudo npm link, then I run make tests , I still got the error.

@veged
Copy link
Owner

veged commented Apr 25, 2012

after npm link you still have the same error?

module.js:332
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'krasota/lib/beautifiers/always-semicolons'

@wong2
Copy link
Author

wong2 commented Apr 26, 2012

yes

@veged
Copy link
Owner

veged commented Apr 26, 2012

I think you have't npm's root path in your NODE_PATH, so node can't find global installed npm modules.
Try this: echo 'export NODE_PATH="'$(npm root -g):$NODE_PATH'"'>> ~/.bashrc && . ~/.bashrc (or change for your environment).

@veged
Copy link
Owner

veged commented Apr 26, 2012

anyway i think to remove all global paths from tests

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

2 participants