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

noflo is not meant for Windows also ? (UPDATE: it is!) #94

Closed
ghost opened this issue Jul 29, 2013 · 46 comments
Closed

noflo is not meant for Windows also ? (UPDATE: it is!) #94

ghost opened this issue Jul 29, 2013 · 46 comments

Comments

@ghost
Copy link

ghost commented Jul 29, 2013

Tue 07/30/2013  1:34:56.05 S:\workspace.js.2013\noflo>grunt build
Running "build" task

Running "coffee:libraries" (coffee) task
File lib/ArrayPort.js created.
File lib/AsyncComponent.js created.
File lib/Component.js created.
File lib/ComponentLoader.js created.
File lib/Graph.js created.
File lib/InternalSocket.js created.
File lib/LoggingComponent.js created.
File lib/Network.js created.
File lib/NoFlo.js created.
File lib/Port.js created.
File lib/shell.js created.

Running "coffee:libraries_nodejs" (coffee) task
File lib/nodejs/ComponentLoader.js created.

Running "coffee:bin" (coffee) task
File bin/noflo.js created.

Running "coffee:spec" (coffee) task
File spec/ArrayPort.js created.
File spec/AsyncComponent.js created.
File spec/ComponentLoader.js created.
File spec/Graph.js created.
File spec/Network.js created.
File spec/Port.js created.
File spec/Subgraph.js created.

Running "component:install" (component) task
    # S:\workspace.js.2013\noflo >
    s:\workspace.js.2013\noflo\node_modules\grunt-component\node_modules\.bin\component.cmd install


     install : component/emitter@master
     install : component/underscore@master
     install : noflo/fbp@master
    complete : noflo/fbp
    complete : component/underscore
    complete : component/emitter


Running "component_build:noflo" (component_build) task

Running "uglify:noflo" (uglify) task
File "./browser/noflo.min.js" created.
Original: 136515 bytes.
Minified: 54554 bytes.

Done, without errors.

Tue 07/30/2013  1:35:50.96 S:\workspace.js.2013\noflo>npm link
npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
npm WARN package.json growl@1.7.0 No repository field.
npm WARN package.json ms@0.3.0 No repository field.
npm WARN package.json string-to-js@0.0.1 No repository field.
npm WARN package.json batch@0.3.2 No repository field.
npm WARN package.json vows@0.7.0 No repository field.
npm WARN package.json batch@0.2.1 No repository field.
npm WARN package.json better-assert@0.1.0 No repository field.
npm WARN package.json component-require@0.2.2 No repository field.
npm WARN package.json ms@0.1.0 No repository field.
npm WARN package.json emitter-component@1.0.0 No repository field.
npm WARN package.json cookiejar@1.3.0 No repository field.
npm WARN package.json methods@0.0.1 No repository field.
npm WARN package.json eyes@0.1.8 No repository field.
npm WARN package.json github-url-from-git@1.1.1 No repository field.
npm WARN package.json callsite@1.0.0 No repository field.
npm WARN unmet dependency S:\workspace.js.2013\noflo\node_modules\grunt-component-build requires co
ffee-script@'latest' but will load
npm WARN unmet dependency S:\workspace.js.2013\noflo\node_modules\coffee-script,
npm WARN unmet dependency which is version 1.6.3
s:\nodist\bin\noflo -> s:\nodist\bin\node_modules\noflo\bin\noflo
s:\nodist\bin\node_modules\noflo -> S:\workspace.js.2013\noflo

Tue 07/30/2013  1:36:09.18 S:\workspace.js.2013\noflo>noflo

module.js:340
    throw err;
          ^
Error: Cannot find module 'emitter'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:9:20)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:422:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Tue 07/30/2013  1:36:16.14 S:\workspace.js.2013\noflo>

@bergie
Copy link
Member

bergie commented Jul 29, 2013

@AtKaaZ unfortunately I don't have access to Windows to debug this, but certainly I'd love to support that platform as well. Let me know if you find out what is going wrong there!

@ghost
Copy link
Author

ghost commented Jul 29, 2013

I'll let you know if I find anything, but considering that I'm like new to js and esp. to noflo and coffeescript ... I just might give up again ;)

@bergie
Copy link
Member

bergie commented Jul 29, 2013

@AtKaaZ ah, reading the error again, it seems the issue is with detecting the Node.js environment on Windows, so it tries to run with browser version of dependencies. We're using the following for detection:

if typeof process is 'object' and process.title is 'node'

Can you check what console.log(process.title); returns in your environment?

@ghost
Copy link
Author

ghost commented Jul 30, 2013

how do I run that console.log(process.title); ? I've no idea currently

@bergie
Copy link
Member

bergie commented Jul 30, 2013

you can create a .js file with that and run it with Node

@ghost
Copy link
Author

ghost commented Jul 30, 2013

cool thanks, returns this:
Administrator: C:\Windows\System32\cmd.exe - node a.js

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ thanks! Can you try this as well?

console.log(process.title.indexOf('node') !== -1);

It think that will be the platform check to use.

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Sure. It says true

bergie added a commit that referenced this issue Jul 30, 2013
@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ I just pushed a potential fix. Can you try it out? If it works, I'll roll it to the various component libraries as well.

If you have the time, this would help me to ensure NoFlo works on Node.js on Windows before I push 0.4 out :-)

bergie added a commit to noflo/grunt-init-noflo that referenced this issue Jul 30, 2013
@ghost
Copy link
Author

ghost commented Jul 30, 2013

I went to sleep after like 10 minutes, sorry for the delay :)
Time is something that I have, I'll be glad to help out so don't hesitate to ask me to do things, I like it! :D

I did:

  1. git pull
  2. grunt build
  3. npm fix
  4. noflo

I'm still getting this for some reason:

Tue 07/30/2013 10:51:03.73 s:\workspace.js.2013\noflo>noflo

module.js:340
    throw err;
          ^
Error: Cannot find module 'emitter'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (s:\workspace.js.2013\noflo\lib\Graph.js:9:20)
    at Object.<anonymous> (s:\workspace.js.2013\noflo\lib\Graph.js:422:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

But I am not sure if I did those thing right?

@ghost
Copy link
Author

ghost commented Jul 30, 2013

If I just run grunt instead of grunt build I get this:

Tue 07/30/2013 10:53:02.28 s:\workspace.js.2013\noflo>grunt
Running "test" task

Running "coffeelint:libraries" (coffeelint) task
[warn] src/lib/ArrayPort.coffee:5 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:234 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:235 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:238 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:321 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/InternalSocket.coffee:35 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:115 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:145 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:212 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:221 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:281 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:311 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:312 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:314 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:315 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:326 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:347 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:348 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:5 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:24 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:33 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:36 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:40 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:41 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:61 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:67 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:68 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:74 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:75 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:112 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Port.coffee:18 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:95 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:99 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:102 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:109 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:166 Line exceeds maximum allowed length (max_line_length)

Running "coffeelint:components" (coffeelint) task
>> 2 files lint free.

Running "coffee:libraries" (coffee) task
File lib/ArrayPort.js created.
File lib/AsyncComponent.js created.
File lib/Component.js created.
File lib/ComponentLoader.js created.
File lib/Graph.js created.
File lib/InternalSocket.js created.
File lib/LoggingComponent.js created.
File lib/Network.js created.
File lib/NoFlo.js created.
File lib/Port.js created.
File lib/shell.js created.

Running "coffee:libraries_nodejs" (coffee) task
File lib/nodejs/ComponentLoader.js created.

Running "coffee:bin" (coffee) task
File bin/noflo.js created.

Running "coffee:spec" (coffee) task
File spec/ArrayPort.js created.
File spec/AsyncComponent.js created.
File spec/ComponentLoader.js created.
File spec/Graph.js created.
File spec/Network.js created.
File spec/NoFlo.js created.
File spec/Port.js created.
File spec/Subgraph.js created.

Running "nodeunit:all" (nodeunit) task
Fatal error: Cannot find module 'emitter'

Tue 07/30/2013 10:53:11.07 s:\workspace.js.2013\noflo>

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Just in case you want to see the output of: grunt build, npm link, noflo

Tue 07/30/2013 13:15:54.44 S:\workspace.js.2013\noflo>grunt build
Running "build" task

Running "coffee:libraries" (coffee) task
File lib/ArrayPort.js created.
File lib/AsyncComponent.js created.
File lib/Component.js created.
File lib/ComponentLoader.js created.
File lib/Graph.js created.
File lib/InternalSocket.js created.
File lib/LoggingComponent.js created.
File lib/Network.js created.
File lib/NoFlo.js created.
File lib/Port.js created.
File lib/shell.js created.

Running "coffee:libraries_nodejs" (coffee) task
File lib/nodejs/ComponentLoader.js created.

Running "coffee:bin" (coffee) task
File bin/noflo.js created.

Running "coffee:spec" (coffee) task
File spec/ArrayPort.js created.
File spec/AsyncComponent.js created.
File spec/ComponentLoader.js created.
File spec/Graph.js created.
File spec/Network.js created.
File spec/NoFlo.js created.
File spec/Port.js created.
File spec/Subgraph.js created.

Running "component:install" (component) task
    # S:\workspace.js.2013\noflo >
    s:\workspace.js.2013\noflo\node_modules\grunt-component\node_modules\.bin\component.cmd install


     install : component/emitter@master
     install : component/underscore@master
     install : noflo/fbp@master


Running "component_build:noflo" (component_build) task

Running "uglify:noflo" (uglify) task
File "./browser/noflo.min.js" created.
Original: 136736 bytes.
Minified: 54736 bytes.

Done, without errors.

Tue 07/30/2013 13:16:28.66 S:\workspace.js.2013\noflo>npm link
npm WARN unmet dependency S:\workspace.js.2013\noflo\node_modules\grunt-component-build requires co
ffee-script@'latest' but will load
npm WARN unmet dependency S:\workspace.js.2013\noflo\node_modules\coffee-script,
npm WARN unmet dependency which is version 1.6.3
s:\nodist\bin\noflo -> s:\nodist\bin\node_modules\noflo\bin\noflo
s:\nodist\bin\node_modules\noflo -> S:\workspace.js.2013\noflo

Tue 07/30/2013 13:16:34.17 S:\workspace.js.2013\noflo>noflo

module.js:340
    throw err;
          ^
Error: Cannot find module 'emitter'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:9:20)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:422:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Tue 07/30/2013 13:16:35.48 S:\workspace.js.2013\noflo>

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ that seems to be the same error as before. Did you do a git pull to get my fixes in?

@ghost
Copy link
Author

ghost commented Jul 30, 2013

yes I did, git log says this is top commit:
commit e827c0f
Author: Henri Bergius henri.bergius@iki.fi
Date: Tue Jul 30 03:06:41 2013 +0200

Platform detection in main NoFlo interface, refs #94 

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ ok, I think you need to re-run grunt build

@bergie
Copy link
Member

bergie commented Jul 30, 2013

BTW, this is the main remaining issue before I feel confident to release NoFlo 0.4

@ghost
Copy link
Author

ghost commented Jul 30, 2013

ok, grunt build in noflo folder...

Tue 07/30/2013 22:14:12.85 S:\workspace.js.2013\noflo>grunt build
Running "build" task

Running "coffee:libraries" (coffee) task
File lib/ArrayPort.js created.
File lib/AsyncComponent.js created.
File lib/Component.js created.
File lib/ComponentLoader.js created.
File lib/Graph.js created.
File lib/InternalSocket.js created.
File lib/LoggingComponent.js created.
File lib/Network.js created.
File lib/NoFlo.js created.
File lib/Port.js created.
File lib/shell.js created.

Running "coffee:libraries_nodejs" (coffee) task
File lib/nodejs/ComponentLoader.js created.

Running "coffee:bin" (coffee) task
File bin/noflo.js created.

Running "coffee:spec" (coffee) task
File spec/ArrayPort.js created.
File spec/AsyncComponent.js created.
File spec/ComponentLoader.js created.
File spec/Graph.js created.
File spec/Network.js created.
File spec/NoFlo.js created.
File spec/Port.js created.
File spec/Subgraph.js created.

Running "component:install" (component) task
    # S:\workspace.js.2013\noflo >
    s:\workspace.js.2013\noflo\node_modules\grunt-component\node_modules\.bin\component.cmd install


     install : component/emitter@master
     install : component/underscore@master
     install : noflo/fbp@master


Running "component_build:noflo" (component_build) task

Running "uglify:noflo" (uglify) task
File "./browser/noflo.min.js" created.
Original: 136736 bytes.
Minified: 54736 bytes.

Done, without errors.

Tue 07/30/2013 22:19:15.27 S:\workspace.js.2013\noflo>

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ ok, and can you run noflo now?

@bergie
Copy link
Member

bergie commented Jul 30, 2013

Note that I didn't apply the platform check fix to other component libraries yet. I'll do that once you confirm NoFlo runs after it ;-)

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Tue 07/30/2013 22:21:37.43 S:\workspace.js.2013\noflo>noflo

module.js:340
    throw err;
          ^
Error: Cannot find module 'emitter'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:9:20)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:422:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Tue 07/30/2013 22:22:04.26 S:\workspace.js.2013\noflo>

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Tue 07/30/2013 22:22:04.26 S:\workspace.js.2013\noflo>which noflo
s:\nodist\bin\noflo

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Tue 07/30/2013 22:23:03.49 S:\workspace.js.2013\noflo>npm link
npm WARN unmet dependency S:\workspace.js.2013\noflo\node_modules\grunt-component-build requires co
ffee-script@'latest' but will load
npm WARN unmet dependency S:\workspace.js.2013\noflo\node_modules\coffee-script,
npm WARN unmet dependency which is version 1.6.3
s:\nodist\bin\noflo -> s:\nodist\bin\node_modules\noflo\bin\noflo
s:\nodist\bin\node_modules\noflo -> S:\workspace.js.2013\noflo

Tue 07/30/2013 22:23:11.11 S:\workspace.js.2013\noflo>which noflo
s:\nodist\bin\noflo

Tue 07/30/2013 22:23:13.89 S:\workspace.js.2013\noflo>noflo

module.js:340
    throw err;
          ^
Error: Cannot find module 'emitter'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:9:20)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:422:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
Tue 07/30/2013 22:23:15.48 S:\workspace.js.2013\noflo>where noflo
s:\nodist\bin\noflo
s:\nodist\bin\noflo.cmd

@ghost
Copy link
Author

ghost commented Jul 30, 2013

is there some way to force a clean? if that even makes sense, but I'm guessing it recompiles everything regardless?

@ghost
Copy link
Author

ghost commented Jul 30, 2013

If I run just grunt it tells me too that i can't find module emitter
Any ideas why?

Tue 07/30/2013 22:26:13.59 S:\workspace.js.2013\noflo>grunt
Running "test" task

Running "coffeelint:libraries" (coffeelint) task
[warn] src/lib/ArrayPort.coffee:5 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:234 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:235 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:238 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Graph.coffee:321 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/InternalSocket.coffee:35 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:115 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:145 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:212 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:221 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:281 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:311 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:312 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:314 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:315 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:326 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:347 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Network.coffee:348 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:5 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:24 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:33 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:36 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:40 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:41 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:61 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:67 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:68 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:74 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:75 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/NoFlo.coffee:112 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/Port.coffee:18 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:95 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:99 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:102 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:109 Line exceeds maximum allowed length (max_line_length)
[warn] src/lib/shell.coffee:166 Line exceeds maximum allowed length (max_line_length)

Running "coffeelint:components" (coffeelint) task
>> 2 files lint free.

Running "coffee:libraries" (coffee) task
File lib/ArrayPort.js created.
File lib/AsyncComponent.js created.
File lib/Component.js created.
File lib/ComponentLoader.js created.
File lib/Graph.js created.
File lib/InternalSocket.js created.
File lib/LoggingComponent.js created.
File lib/Network.js created.
File lib/NoFlo.js created.
File lib/Port.js created.
File lib/shell.js created.

Running "coffee:libraries_nodejs" (coffee) task
File lib/nodejs/ComponentLoader.js created.

Running "coffee:bin" (coffee) task
File bin/noflo.js created.

Running "coffee:spec" (coffee) task
File spec/ArrayPort.js created.
File spec/AsyncComponent.js created.
File spec/ComponentLoader.js created.
File spec/Graph.js created.
File spec/Network.js created.
File spec/NoFlo.js created.
File spec/Port.js created.
File spec/Subgraph.js created.

Running "nodeunit:all" (nodeunit) task
Fatal error: Cannot find module 'emitter'

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ ok, sounds like the platform check we made is still failing on Windows. Thanks for trying it. Let me figure out another way...

@ghost
Copy link
Author

ghost commented Jul 30, 2013

ok, that's odd... it seemed to work with that a.js that I made, like so:

Tue 07/30/2013 22:26:20.77 S:\workspace.js.2013\noflo>type a.js
console.log(process.title.indexOf('node') !== -1);
Tue 07/30/2013 22:34:02.30 S:\workspace.js.2013\noflo>where node
s:\nodist\bin\node.exe

Tue 07/30/2013 22:34:06.84 S:\workspace.js.2013\noflo>node a.js
true

@ghost
Copy link
Author

ghost commented Jul 30, 2013

I just searched all files in noflo folder for this typeof process is 'object' and process.title is 'node'
and I've found only 2:
two old style left

bergie added a commit that referenced this issue Jul 30, 2013
@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ I changed the approach for platform detection again. Can you pull and rebuild/test again?

@ghost
Copy link
Author

ghost commented Jul 30, 2013

sure, git pull, grunt build, grunt test (failed same way) and noflo

module.js:340
    throw err;
          ^
Error: Cannot find module 'emitter'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:9:20)
    at Object.<anonymous> (S:\workspace.js.2013\noflo\lib\Graph.js:422:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

@ghost
Copy link
Author

ghost commented Jul 30, 2013

ok wait... seems like I got a merge error now

@ghost
Copy link
Author

ghost commented Jul 30, 2013

because I changed those two files to have the new detection, the git pull wasn't completed ...
but works now! noflo works

Tue 07/30/2013 22:48:03.80 S:\workspace.js.2013\noflo>noflo
s:\nodist\bin\node_modules\noflo\bin\noflo is not a NoFlo graph file, skipping

@bergie
Copy link
Member

bergie commented Jul 30, 2013

Can you run this for me?

console.log(process.execPath);

@ghost
Copy link
Author

ghost commented Jul 30, 2013

console.log(process.execPath); shows:
s:\nodist\bin\node.exe

noting that grunt (test?) does this:

Running "coffeelint:components" (coffeelint) task
[error] src/components/Graph.coffee:87 Line exceeds maximum allowed length (max_line_length)
Warning: Task "coffeelint:components" failed. Use --force to continue.

Aborted due to warnings.

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ great, thanks a lot! We'll need to roll out the fix to the other component libraries and then NoFlo should be fine on Windows :-)

@kenhkan we now have:

noflo = require 'noflo'
if noflo.isBrowser()
  # Load browser deps
else
  # Load Node.js deps

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Awesome! Thanks.

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ I'll ping you once 0.4 launches with these fixes in. If there is anything else that fails on Windows, just let me know.

I fixed that CoffeeLint error in my latest push, so if you can pull again and try npm test, that would be great

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Yes, just grunt now fails with this (showing only last part):

Running "nodeunit:all" (nodeunit) task
Testing AsyncComponent.coffee.....OK
Testing ComponentLoader.coffee..F....
>> Resolve dependency package path
>> Error: 'S:\\workspace.js.2013\\noflo\\node_modules\\read-installed/package.json' == 'S:\\workspa
ce.js.2013\\noflo\\node_modules\\read-installed\\package.json'
>> at S:\workspace.js.2013\noflo\test\ComponentLoader.coffee:33:12
>> at S:\workspace.js.2013\noflo\src\lib\nodejs\ComponentLoader.coffee:174:16
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:118:5
>> at next (node_modules\read-installed\read-installed.js:172:30)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:157:7
>> at LOOP (fs.js:1343:14)
>> at process._tickCallback (node.js:415:13)

Testing Graph.coffee...OK
Testing NoFlo.coffee.......OK
Testing FbpParser.coffee........OK
Testing Port.coffee..OK
Warning: 1/91 assertions failed (5562ms) Use --force to continue.

Aborted due to warnings.

ALSO npm test does this:

Tue 07/30/2013 23:00:23.88 S:\workspace.js.2013\noflo>npm test

> noflo@0.3.3 test S:\workspace.js.2013\noflo
> ./node_modules/.bin/grunt test

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! weird error 1
npm ERR! not ok code 0

@ghost
Copy link
Author

ghost commented Jul 30, 2013

by reversing the slashes in ./node_modules/.bin/grunt test it would work (tested)

Tue 07/30/2013 23:02:43.95 S:\workspace.js.2013\noflo>.\node_modules\.bin\grunt test
Running "test" task
...

EDIT: but that'd probably not work on other platforms

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ yeah, shame about the path difference. But grunt test completes successfully?

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Should I use force? else it doesn't complete Aborted due to warnings.

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ ok, saw that. Pushed a probable fix, so if you can try again.

(sorry for the commit tennis, remote debugging is never easy)

@ghost
Copy link
Author

ghost commented Jul 30, 2013

no problem, I like it this way.

Testing AsyncComponent.coffee.....OK
Testing ComponentLoader.coffeeF......
>> Resolve root package path
>> Error: 'S:\\workspace.js.2013\\noflo\\package.json' == 'S:\\workspace.js.2013\\noflo/package.jso
n'
>> at S:\workspace.js.2013\noflo\test\ComponentLoader.coffee:14:12
>> at S:\workspace.js.2013\noflo\src\lib\nodejs\ComponentLoader.coffee:174:16
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:118:5
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at cb (node_modules\read-installed\node_modules\slide\lib\async-map.js:48:11)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at cb (node_modules\read-installed\node_modules\slide\lib\async-map.js:48:11)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at cb (node_modules\read-installed\node_modules\slide\lib\async-map.js:48:11)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at cb (node_modules\read-installed\node_modules\slide\lib\async-map.js:48:11)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at cb (node_modules\read-installed\node_modules\slide\lib\async-map.js:48:11)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at cb (node_modules\read-installed\node_modules\slide\lib\async-map.js:48:11)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at cb (node_modules\read-installed\node_modules\slide\lib\async-map.js:48:11)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:234:14
>> at asyncMap (node_modules\read-installed\node_modules\slide\lib\async-map.js:27:18)
>> at next (node_modules\read-installed\read-installed.js:200:5)
>> at S:\workspace.js.2013\noflo\node_modules\read-installed\read-installed.js:157:7
>> at LOOP (fs.js:1343:14)
>> at process._tickCallback (node.js:415:13)

Testing Graph.coffee...OK
Testing FbpParser.coffee........OK
Testing NoFlo.coffee.......OK
Testing Port.coffee..OK
Warning: 1/91 assertions failed (5200ms) Use --force to continue.

Aborted due to warnings.

bergie added a commit that referenced this issue Jul 30, 2013
@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ ok, pushed a fix for that as well

@ghost
Copy link
Author

ghost commented Jul 30, 2013

Done, without errors.

@bergie
Copy link
Member

bergie commented Jul 30, 2013

@AtKaaZ awesome, thanks!

I'll close this issue now, and we'll roll the Windows-compatible platform checks to the NoFlo component libraries over the next few days with @kenhkan

@bergie bergie closed this as completed Jul 30, 2013
@kenhkan
Copy link
Contributor

kenhkan commented Jul 31, 2013

Update: most core libs have been updated with the isBrowser() helper. Test will fail unless you're using master until 0.4.0 is pushed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants