Error trying to run the tests


#1

Hi,

I’m in Ubuntu trying to run the tests from the CLI (https://github.com/ajadex/ember.js#from-the-cli) and it’s failing with the command npm test.

The output from the terminal is:

  > ember@1.12.0-beta.1 pretest /home/ajadex/projects/ember.js
  > ember build
        
version: 0.1.15 Could not find watchman, falling back to NodeWatcher for file system events 
Build failed. 
EACCES, unlink 'dist/jquery/jquery.js' 
Error: EACCES, unlink 'dist/jquery/jquery.js' 
npm ERR! weird error 1 
npm WARN This failure might be due to the use of legacy binary "node" 
npm WARN For further explanations, please read 
/usr/share/doc/nodejs/README.Debian   

npm ERR! not ok code 0

Can somebody tell me what I’m missing?


#2

@ajadex what version of node are you running? The warning there hints at an issue with old node versions.


#3

version v0.10.25.

hum, weird, I checked the website and latest version is v0.12 but apt-get install nodejs doesn’t get me that.


#4

I manually installed latest node: 0.12.0 and I ran npm test again. Now the error doesn’t say anything about the node legacy version:

Running: phantomjs bower_components/qunit-phantom-runner/runner.js ./dist/tests/index.html?package=container
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn phantomjs ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
npm ERR! Test failed.  See above for more details.

#5

Just for documentation if anybody else is having the same issue. I fixed by installing phantomjs using npm install -g phantomjs.

I had phantomjs already installed and in the PATH, but installing it using npm was the only way to solve the issue.