casperjs.bat on windows fails with cannot find module cli.js error - phantomjs

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?

This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.

I was using the master build of casper. With the latest released version, 1.0.2, it works fine.

Related

"invalid version 0 on git_proxy_options" from libgit2: cause? fix? walk-around?

I'm getting this error "invalid version 0 on git_proxy_options" from libgit2. This did not happen until very recently (I have recompiled my code so it may be a version issue). I'm not using a proxy. Does anyone know anything about this? What causes this message? Is there anything I can do to stop the failure? Either a fix or or a work-around will do.
Specifically, I am using the Rust crate git2 version 0.13.23. I am doing a fetch that triggers the error. This is on Fedora 34 on x86_64. I have searched on this but there does not seem to be any matches that help.
git2 = {version="0.13.22", features = ["vendored-libgit2"]}
in Cargo.toml fixed the issue.
Interesting...
I had upgraded libgit2 to 1.3.0 from 1.1.1. That broke my existing cargo install, so I unpacked the previous libgit2.so.1.1 with a symlink to libgit2.so.1. That's when this error condition showed up. After thinking a bit I decided to symlink libgit2.so.1.3 to libgit2.so.1.1 and it built my new cargo version which linked to the new libgit2.so.1.3. Then I deleted my libgit2.so.1.1 stuff. Kinda weird, and usually you expect things not to work when it has been linked to a previous .so version.

Couchapp - default template not found when running `couchapp generate ...` on Windows

After thorough browsing I decided to post here as I could not find a working prompt on the problem.
I installed CouchDB and Couchapp (in version 1.0.0, freshest one on Github) on Win8 machine and when I try to run couchapp generate app contacts I get:
2014-11-21 22:01:00 [ERROR] couchapp error: Can't create a CouchApp in C:\Users\
Michal\Desktop\contacts: default template not found.
I have not so far dug deeper into the Couchapp code to see if I can fix it. Fixes applied by Couchapp creator, Benoit, don't work for me.
All advice/constructive criticism much appreciated.
OK, I got it working - all that was needed was to include an environment variable for couchapp.exe. So, if you are installing a standalone version of Couchapp from the downloads section ( https://github.com/downloads/couchapp/couchapp/couchapp-1.0.0-win.zip, e.g. ) you NEED TO MAKE SURE that you first of all execute the installer and then point you environment variables Path to it, that's all. Hope it helps.

Travis-CI not being able to load tv4

My project was passing on Travis till my last commit. After this commit, Travis says:
Error: Cannot find module 'tv4' (at https://travis-ci.org/a85/Newman/builds/37216427#L141)
It has installed tv4#1.1.3 as part of the build (as seen at https://travis-ci.org/a85/Newman/builds/37216427#L40)
In version 1.1.3 of tv4, the name field in package.json is "tv4" (https://github.com/geraintluff/tv4/commit/4887d0f073951db681d23b9fde69ed7a9092fdea), so I guess it's not a case issue.
I've tried rebuilding a number of times, but it hasn't helped. Running grunt test locally works perfectly.
Any ideas?
I have the same issue, but i managed to fix this when i changed package.json to the following:
{"main": "tv4.js"}
Instead of
{"main": "tv4.min.js"}
If you take a look at:
https://github.com/geraintluff/tv4/issues/157

Can't get PhantomJS to work with a simple example

I've downloaded the executable and created a simlink to /usr/local/bin.
I'm under Mac OSX 10.7
When I then try to run a script that requires some module i.e.
var page = require('webpage').create();
I got an error
undefined:0 ReferenceError: Can't find variable: require
as if 'require' is not seen as a reserved word but interpreted as a variable symbol.
(As an aside, whenever I lunch phantomjs a Sencha Touch icon appears in my Dock)
Your copy of PhantomJS is from an older version. Always get the latest one from http://phantomjs.org.
I had this issue too, and the problem was my version of mocha -- going back to 1.9.0 fixed it.
SenchaTouch 2.0 installs PhantomJS 1.1 somewhere depending on the OS. Under *NIX check where with 'which phantomjs'.
Just modify your bash or whatever configuration file accordingly to remove the Phantomjs included with SenshaTouch from your PATH.

Not getting TBB to compile test examples

I am not getting TBB to work. I am following the steps in the "Getting started" document.
I am doing the following steps:
downloading the linux files + the sources files.
extracting them in 1 directory
calling make
going to tbb.../bin calling source tbbvars.sh intel64
going to examples/Getting_started/sub_string_finder
calling make
I then get the error:
sub_string_finder.cpp:32:30: fatal error: tbb/parallel_for.h: No such file or directory
I really googled a lot but can't find any related stuff.
I did also try to add some -I statement but it didnt help
I assume it is kind of a including/linking problem but I dont know how to fix.
This is all done on fedora 16 64bit. (kernel 3.1.4) // TBB version 4.0
The solution was to install tbb-devel package.