"tree match failed" error
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.
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
eyesmodule by myself withsudo npm install -g eyes, then I run this commandkrasota -i test.js -b krasota/lib/beautifiers/split-varsand 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 krasotato unintall the installed package, fetch and merge the code from github, then runsudo npm install -gin the directory of my local clone of krasota, then runkrasota -i test.js -b krasota/lib/beautifiers/split-varsagain, 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: https://github.com/veged/krasota.js/issues/3
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
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 Icdintokrasota.js, runnpm install, then I runmake 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: https://github.com/veged/krasota.js/issues/3#issuecomment-5324120
I tried to run sudo npm link, then I run make tests , I still got the error.
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'
yes
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).
anyway i think to remove all global paths from tests