Giter Site home page Giter Site logo

Comments (12)

anderslm avatar anderslm commented on July 19, 2024

You installed the package with -g enabled?
npm install -g decaf

Which user are FitNesse running under and for which user have you installed decaf?

What operating system are you using?

from decaf.

msuarz avatar msuarz commented on July 19, 2024

Hey sorry for the delay ... yes I install it with -g ... I use windows mainly ... I have a couple of macs so I could try there

from decaf.

anderslm avatar anderslm commented on July 19, 2024

Could you check that decaf is installed in %AppData%\npm? Also, which user did you install as and which user do you run FitNesse as? They have to match.

from decaf.

davidmoshal avatar davidmoshal commented on July 19, 2024

I have exactly the same issue:

"Unable to start test system 'slim': java.io.IOException: Cannot run program "decaf.cmd": error=2, No such file or directory"

I ran decaf, to see if it was installed, and got an error:

"env: coffee\r: No such file or directory"

So, apart from user issues, it's not finding coffee.

I installed as sudo, and ran FitNesse as me, a user on OSX with admin privileges.

I'm actually wondering if we can install this locally somewhere so that it can be run by the same user that runs fitnesse.

Any idea about the environment error?

from decaf.

davidmoshal avatar davidmoshal commented on July 19, 2024

Couple of things of note:

  1. I'm on OSX and the error in the test browser is:
    start test system 'slim': java.io.IOException: Cannot run program "decaf.cmd": error=2, No such file or directory

Note "decaf.cmd" - I'm on OSX, but that looks like a Windows command, no?

  1. my decaf is installed as an alias in
    /usr/bin
    decaf aliases:
    ../lib/node_modules/decaf/bin/decaf

from decaf.

davidmoshal avatar davidmoshal commented on July 19, 2024

Ok, so a tiny bit of progress:

After this instruction:

Point your browser to http://localhost:8080/root?edit

you need to change
{decaf.cmd %p}
to
{decaf %p}
ie:

!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {decaf.cmd %p}
!path fixtures!path fixtures

So, now it runs decaf, shows this for 10 seconds:

Preparing Tests...

Then there is a red warning:

Error Occurred

and a yellow warning:

Testing was interrupted and results are incomplete. 
Test Pages: 0 right, 0 wrong, 0 ignored, 0 exceptions     
Assertions: 0 right, 0 wrong, 0 ignored, 0 exceptions (10.102 seconds)

and, it throws this exception from the jar file:

WARNING: error registered in test system [null]
java.lang.NullPointerException
    at fitnesse.testsystems.slim.SlimCommandRunningClient.writeString(SlimCommandRunningClient.java:209)
    at fitnesse.testsystems.slim.SlimCommandRunningClient.invokeAndGetResponse(SlimCommandRunningClient.java:135)

So, now we're actually running decaf, but I'm still concerned about this message which you get when running decaf from the command line:

env: coffee\r: No such file or directory

That's my next exploration.

David

from decaf.

davidmoshal avatar davidmoshal commented on July 19, 2024

So, in googling around I came across folks who had a similar error, with a different program:

surjikal/sublime-coffee-compile#9

The advice is:

OSX mountain lion doesn't use the environment variables you set in your .bash_profile (or equivalent) when you launch GUI apps. But there's a way to give GUI apps env variables. You do this by creating/modifying your /etc/launchctl.conf file.

Add the following line to /etc/launchctl.conf:

setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:<node_dir>:<coffee_dir>

And then reboot.

from decaf.

NicoleRauch avatar NicoleRauch commented on July 19, 2024

I ran into the same problem on Mac OS X... Neither bin/decaf nor bin/decaf-js work for me on the command line. And I don't really feel like tampering around with launchctl.conf (also b/c of portability).

So my ugly and brute-force but sufficient solution is this:

!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {node ../node_modules/decaf/lib/decaf %p}

(given that the folder where I invoke Fitnesse is a sibling of the node_modules folder)

@msuarz: Maybe you can find a nicer way to get this to work on a Mac?

from decaf.

msuarz avatar msuarz commented on July 19, 2024

I just switched my dev setup into mac ... I'll look into it ... cheers

from decaf.

msuarz avatar msuarz commented on July 19, 2024

It looks like a problem with line endings ... i was able to run everything fine in the mac ... I republished and the new version should have the proper line endings given i did it from the mac ... I think windows can handle it fine ... plus the error was in a line that windows doesn't care for ... please notice that as david said it works with {decaf %p} instead of decaf.cmd

cheers ... happy new year

from decaf.

NicoleRauch avatar NicoleRauch commented on July 19, 2024

The new version 0.1.6 now works for me - thanks very much!

Happy New Year :-)

from decaf.

msuarz avatar msuarz commented on July 19, 2024

awesome cheers

from decaf.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.