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

espresso running using node on Windows 7 #42

Closed
maxnis opened this issue Nov 4, 2011 · 4 comments
Closed

espresso running using node on Windows 7 #42

maxnis opened this issue Nov 4, 2011 · 4 comments

Comments

@maxnis
Copy link

maxnis commented Nov 4, 2011

Finally i installed cygwin and node - which can run hello example, but when i run command in the cygwin shell: node espresso.js i get the following :

$ node espresso.js

node.js:63
throw e;
^
Error: Cannot find module 'step'
at loadModule (node.js:275:15)
at require (node.js:411:14)
at Object. (/cygdrive/c/themproject/espresso/core/e.js:64:25)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
at Object. (/cygdrive/c/themproject/espresso/core/commands/versio
n.js:12:9)
at Module._compile (node.js:462:23)

@4z3
Copy link
Contributor

4z3 commented Nov 4, 2011

It seems like you haven't initialized the submodules; try

(cd /cygdrive/c/themproject/espresso && git submodule update --init)

@maxnis
Copy link
Author

maxnis commented Nov 7, 2011

I'm pretty sure I ran the update command the first time, nonetheless i ran it again, and get the same error. what am i doing wrong? how to start epresso? node espresso.js?

@maxnis
Copy link
Author

maxnis commented Nov 7, 2011

ok, i figured it out myself, not sure if it's versions mismatch, a node bug - must have step.js file or espresso must load it correctly:
the e.js line 64 tries to load node step.js file:
E.prototype.sequencer = require('step'); - which was not in the node lib folder
so i changed the path to the espresso step.js file
E.prototype.sequencer = require('../node_modules/step/lib/step');
and it started working.
Node version: 0.2.6
Espresso version: 0.7.2

The same problem is in files: /espresso/generator/file_generator.js and project_generator.js
There is the same problem with all node modules: mu, step, wwwdude. So i couldn't run the server, project was half generated,
but after copying the entire framework folder from a sample project - build ran successfully and generated build folder, which works, been deployed to the web server (IIS in this case).

@4z3
Copy link
Contributor

4z3 commented Nov 8, 2011

Thank you for the extensive bug-report; I just reconstructed the problem with the said Node version and it happens to affect all the Espresso versions.

Unfortunately it also seems that there where no plans to support Node 0.2 in the first place and I'm not sure if there are any plans to support it any time soon, if at all.

If you cannot upgrade to Node 0.4 or higher, you could try to set the environmental variable NODE_PATH to the appropriate colon-separated list of directories. On POSIX-like systems one could call Espresso directly with the augmented environment like this:

NODE_PATH="/path/to/your/Espresso/node_modules/step/lib" espresso version

@4z3 4z3 closed this as completed May 19, 2012
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