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

Which version of Node to use with testing Meteor application? #204

Closed
rjsmith opened this issue Dec 19, 2015 · 14 comments
Closed

Which version of Node to use with testing Meteor application? #204

rjsmith opened this issue Dec 19, 2015 · 14 comments
Labels

Comments

@rjsmith
Copy link

rjsmith commented Dec 19, 2015

Hi,

I'd like to try out chimp with my Meteor application. I have Node 0.10.40 installed on my dev machine, as that is the version that my production app hosted on modulus.io uses. I also understand that Meteor is not supported on anything more recent that 0.10.40.

When I tried to install chimp using npm install -g chimp, the install proceded until it tried to run the selenium standalone script, at which point I get the following error:

[chimp] Watching features with tagged with @dev,@watch,@focus
[chimp] Running...
selenium-standalone installation [====================] 100% 0.0s
/usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/lib/install.js:248
  fs.access(where, fs.R_OK | fs.X_OK, function(err) {
     ^
TypeError: Object #<Object> has no method 'access'
    at chmodChromeDr (/usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/lib/install.js:248:6)
    at /usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/node_modules/async/lib/async.js:699:13
    at iterate (/usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/node_modules/async/lib/async.js:256:13)
    at /usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/node_modules/async/lib/async.js:268:29
    at /usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/node_modules/async/lib/async.js:40:16
    at /usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/node_modules/async/lib/async.js:705:17
    at Object._onImmediate (/usr/local/lib/node_modules/chimp/node_modules/selenium-standalone/lib/install.js:223:5)
    at processImmediate [as _immediateCallback] (timers.js:363:15)

Doing a bit of research, I think the problem is that Node 0.10.40 does not have the fs.access method.

Should I upgrade my dev machine to the latest and greatest Node version to be able to install and run chimp?

@rjsmith rjsmith changed the title What version of Node to use with testing Meteor application? Which version of Node to use with testing Meteor application? Dec 19, 2015
@samhatoum
Copy link
Member

Hey Richard

You may be able to use Phantom, or if you start your own selenium server then you can pass Chimp the host.

I would recommend a higher Node version for Chimp for sure, and I wish Meteor would use an up-to-date Node. We're on v5.2.0 now!

@rjsmith
Copy link
Author

rjsmith commented Dec 19, 2015

OK, thanks Sam for the clarification (maybe you add a gotcha to the Chimp
docs somewhere for Meteor folk...). Interested why no one else seems to
have hit this issue (from looking through the chimp issues list anyhow).

On 19 December 2015 at 22:21, Sam Hatoum notifications@github.com wrote:

Hey Richard

You may be able to use Phantom, or if you start your own selenium server
then you can pass Chimp the host.

I would recommend a higher Node version for Chimp for sure, and I wish
Meteor would use an up-to-date Node. We're on v5.2.0 now!


Reply to this email directly or view it on GitHub
#204 (comment).

@rjsmith
Copy link
Author

rjsmith commented Dec 21, 2015

Hi, reporting back. running chimp with phantomjs seems to work OK

$ chimp --ddp=http://localhost:3000 --browser=phantomjs --path=tests/chimp
[chimp] Running...

Feature: Home page unauthenticated user

  As an unauthenticated user
  I want to see the home page
  So I can see the Sign In link

  @watch
  Scenario: View the home page          # tests/chimp/features/Home page.feature:11
    Given a user is logged out          # tests/chimp/features/Home page.feature:8
    Given I am an unauthenticated user  # tests/chimp/features/Home page.feature:12
    When I navigate to the application  # tests/chimp/features/Home page.feature:13
    Then I am able to see the home page # tests/chimp/features/Home page.feature:14
    And I can see a Sign In link        # tests/chimp/features/Home page.feature:15


1 scenario (1 passed)
5 steps (5 passed)

But if I select chrome or firefox, I get the same node error as above (I am running node 0.10.40). This is not good news for any Meteor folk hoping to switch to use chimp from Velocity Cucumber .... hoping this gets noticed by MDG soon:

meteor/meteor#5124

@samhatoum
Copy link
Member

Thanks for reporting back!

@samhatoum
Copy link
Member

Meteor has its own version of node when it's run, so you can still install 0.5.2 and Meteor will use 0.10.40

@samhatoum
Copy link
Member

That's how it works locally

@samhatoum
Copy link
Member

@rjsmith did installing 0.5.2 work for you?

@rjsmith
Copy link
Author

rjsmith commented Jan 1, 2016

Hi @samhatoum Happy New Year!

Yes - I updated node locally to v5.2.0, I can now run chimp against chrome browser (& phantomjs). And my sanjo:jasmine server integration tests are also all passing, so do not seem to be affected in any way

@shiftux
Copy link

shiftux commented Jan 19, 2016

Hello,
Having the same issue. I'm on node v0.10.36, which is what is in the EPEL CentOS 6.7 Repo.
I don't really understand what you mean by having 2 node versions installed... How would I go about doing that?
thanks in advance!

@samhatoum
Copy link
Member

Meteor uses its own node, so you just need to install the latest node separately to Meteor and you should be good to go

@shiftux
Copy link

shiftux commented Jan 20, 2016

cool, that seems to be working.
for everyone who isn't as well versed as @samhatoum and @rjsmith, here is what I did:
go to where meteor has its version of node installed (adapt user, release and OS):

/home/XXXXX/.meteor/packages/meteor-tool/1.1.10/mt-os.linux.x86_64/dev_bundle/bin

and excecute the following from there (be sure to use the node executables there, with ./node, otherwise the executable from PATH will be used)

./npm cache clean -f
./npm install -g n
sudo ./n stable

this will first install the node module n, which helps to update node and then update node to the latest stable version.
this works for me, chimp runs without the error.
hope this what should have been done and hope it helps

@ghost
Copy link

ghost commented Feb 5, 2016

I've submitted a pull request to make selenium-standalone compatible again with 0.10.x: webdriverio/selenium-standalone#161

@ghost ghost added the meteor-ux label Feb 22, 2016
@ghost
Copy link

ghost commented Feb 22, 2016

selenium-standalone 4.9.1 is node.js 0.10 compatible. I think Chimp should work with 0.10 again. A test is required ;-)

@ghost ghost added the meteor label Feb 22, 2016
@ghost ghost self-assigned this Feb 22, 2016
@ghost ghost added the ready label Feb 25, 2016
@ghost
Copy link

ghost commented Mar 2, 2016

It works with 0.10.40.

@ghost ghost closed this as completed Mar 2, 2016
@ghost ghost removed the ready label Mar 2, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants