CHMOD Error While Running on Windows

606 views
Skip to first unread message

pnewhook

unread,
Nov 7, 2009, 4:00:20 PM11/7/09
to nitro-devel
Hello,

I'm trying to setup Narwhal on windows using the directions from
http://narwhaljs.org/quick-start.html but I run into a problem when I
try to run tusk init hello-web
Here are my steps:

1. Clone git://github.com/gmosx/narwhal.git to C:\gmosx\narwhal
2. Add C:\gmosx\narwhal\bin to my path
3. cd to C:\gmosx
4. run "narwhal narwhal\examples\hello" this returns "Hello, World!"
5. run "narwhal narwhal\examples\narwhal" I see the narwhal, very
pretty.
6. still following the quick start guide i run "narwhal --help" this
gets the listing of narwhal commands
7. run "tusk help" This gets me the list of tusk commands.
8. I then run "tusk init hello-web" This is where things start to go
wrong.

the following directory structure is created at C:\gmosx
hello-web
.tusk
bin
sea
lib

but I get the following error

org.mozilla.javascript.WrappedException: Wrapped java.io.IOException:
Cannot run program "chmod": CreateProcess error=2,
The system cannot find the file specified (C:\Gited\narwhal\engines
\rhino\lib\os-engine.js#48)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx
(Context.java:1776)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at org.mozilla.javascript.NativeJavaMethod.call
(NativeJavaMethod.java:247)
at org.mozilla.javascript.Interpreter.interpretLoop
(Interpreter.java:1688)
at script(C:\Gited\narwhal\engines\rhino\lib\os-engine.js:48)
at script(C:\Gited\narwhal\engines\rhino\lib\os-engine.js:58)
at script(C:\Gited\narwhal\lib\os.js:23)
at script(C:\Gited\narwhal\engines\rhino\lib\file-engine.js:
123)
at script(C:\Gited\narwhal\lib\file.js:603)
at script(C:\Gited\narwhal\lib\narwhal\tusk\init.js:35)
at script(C:\Gited\narwhal\lib\args.js:99)
at script(C:\Gited\narwhal\lib\args.js:474)
at script(C:\Gited\narwhal\lib\narwhal\tusk.js:163)
at script(\C:\Gited\narwhal\bin\tusk:2)
at script(C:\Gited\narwhal\bin\../lib/sandbox.js:250)
at script(narwhal.js:209)
at org.mozilla.javascript.Interpreter.interpret
(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call
(InterpretedFunction.java:164)
at org.mozilla.javascript.optimizer.OptRuntime.callName
(OptRuntime.java:97)
at
org.mozilla.javascript.gen.C__Gited_narwhal_engines_rhino_bin____bootstrap_js_1._c_anonymous_1
(Unknown Source
)
at
org.mozilla.javascript.gen.C__Gited_narwhal_engines_rhino_bin____bootstrap_js_1.call
(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.call2
(OptRuntime.java:76)
at
org.mozilla.javascript.gen.C__Gited_narwhal_engines_rhino_bin____bootstrap_js_1._c_script_0
(Unknown Source)
at
org.mozilla.javascript.gen.C__Gited_narwhal_engines_rhino_bin____bootstrap_js_1.call
(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall
(ContextFactory.java:405)
at org.mozilla.javascript.ScriptRuntime.doTopCall
(ScriptRuntime.java:3066)
at
org.mozilla.javascript.gen.C__Gited_narwhal_engines_rhino_bin____bootstrap_js_1.call
(Unknown Source)
at
org.mozilla.javascript.gen.C__Gited_narwhal_engines_rhino_bin____bootstrap_js_1.exec
(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.evaluateScript
(Main.java:563)
at org.mozilla.javascript.tools.shell.Main.processFileSecure
(Main.java:485)
at org.mozilla.javascript.tools.shell.Main.processFile
(Main.java:451)
at org.mozilla.javascript.tools.shell.Main.processSource
(Main.java:443)
at org.mozilla.javascript.tools.shell.Main.processFiles
(Main.java:196)
at org.mozilla.javascript.tools.shell.Main$IProxy.run
(Main.java:117)
at org.mozilla.javascript.Context.call(Context.java:517)
at org.mozilla.javascript.ContextFactory.call
(ContextFactory.java:514)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
Caused by: java.io.IOException: Cannot run program "chmod":
CreateProcess error=2, The system cannot find the file speci
fied
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
... 24 more
Caused by: java.io.IOException: CreateProcess error=2, The system
cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 32 more


Now I know almost nothing about Linux but I do understand that chmod
is a permission thing. I looked into narwhal\lib\narwhal\tusk\init.js
and saw the only mention of chmod is on line line 35 where it says
sea.chmod(0755);

As a Windows user, how can I get past this? Ultimately I'm trying to
install Jack and put in NitroJS

I realize this is a more Narwhal focused question, but because I'm
using the Nitro patch I thought I'd see what this group thought. Is
there a step I can skip if I want to use Nitro?

Kris Kowal

unread,
Nov 11, 2009, 1:02:58 PM11/11/09
to nitro...@googlegroups.com

This is something we should fix in Narwhal; would you mind posting an
issue ticket that "fs.chmod" does not work on Windows?

Kris Kowal

pnewhook

unread,
Nov 11, 2009, 10:37:52 PM11/11/09
to nitro-devel
Should that be on the trobinson/narwhal github issue log?

On Nov 11, 1:02 pm, Kris Kowal <cowbertvon...@gmail.com> wrote:

Kris Kowal

unread,
Nov 11, 2009, 10:40:28 PM11/11/09
to nitro...@googlegroups.com
On Wed, Nov 11, 2009 at 7:37 PM, pnewhook <peter....@gmail.com> wrote:
>
> Should that be on the trobinson/narwhal github issue log?

Hrm. We should find a way to move those to 280north's repo, but use
Tom's for now.

Kris Kowal

Reply all
Reply to author
Forward
0 new messages