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

Dev under Windows 7 #4

Closed
kbariotis opened this issue Aug 21, 2013 · 10 comments
Closed

Dev under Windows 7 #4

kbariotis opened this issue Aug 21, 2013 · 10 comments

Comments

@kbariotis
Copy link

according to #3 (comment):

when i do node .\bin\njs-install i get:

'.' is not recognized as an internal or external command,
operable program or batch file.

{ [Error: Command failed: '.' is not recognized as an internal or external comma
nd,
operable program or batch file.
] killed: false, code: 1, signal: null }

then i used component, installed packages and do node index.js, i get:

module.js:340
    throw err;
          ^
Error: Cannot find module 'build'
    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 Function.<anonymous> (C:\Users\Kostarelo\Desktop\src\nodejs-starter\confi
g\index.js:46:13)
    at Function.app.configure (C:\Users\Kostarelo\Desktop\src\nodejs-starter\nod
e_modules\express\lib\application.js:393:61)
    at configuration (C:\Users\Kostarelo\Desktop\src\nodejs-starter\config\index
.js:27:7)
    at Object.<anonymous> (C:\Users\Kostarelo\Desktop\src\nodejs-starter\index.j
s:13:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

thanks
KB

@cristiandouce
Copy link
Collaborator

I'll check it on my windows 7.

In the mean time:

node bin\njs-install

outputs same error?

In the second output... did you do set NODE_PATH=lib before node index.js ? Are you on windows default cmd or some kind of unix like bash?

@kbariotis
Copy link
Author

both outputs the same error.

I followed the instructions exactly as you wrote them.

i first try it with Github's shell but then used also cmd and gave me the same stuff.

@cristiandouce
Copy link
Collaborator

ok... Here is the thing.
I just submitted a path issue for the installation script.

After pulling new changes, please remove node_modules, components and public folders.

Then, in Github's shell do the following:

$ npm install
$ node bin\njs-install
$ export NODE_PATH=lib
$ node index.js

That should do it. It does on my windows 7 👊

And in windows default cmd try (removing folders again):

$ npm install
$ node bin\njs-install
$ set NODE_PATH=lib
$ node index.js

That does it too 👯

If the error persists, I'm gonna ask you to paste a full log on a gist or any other pastebin like tool.

Thanks!

@kbariotis
Copy link
Author

still the same mate, sorry for being too late and the issue closed.

first, where is the public folder?

and it keeps giving me when i do node index.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'build'
    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 Function.<anonymous> (C:\Users\Kostarelo\Desktop\src\nodejs-starter\confi
g\index.js:46:13)
    at Function.app.configure (C:\Users\Kostarelo\Desktop\src\nodejs-starter\nod
e_modules\express\lib\application.js:393:61)
    at configuration (C:\Users\Kostarelo\Desktop\src\nodejs-starter\config\index
.js:27:7)
    at Object.<anonymous> (C:\Users\Kostarelo\Desktop\src\nodejs-starter\index.j
s:13:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

this is the full log. Which full log you want to send you?

@cristiandouce
Copy link
Collaborator

@stakisko public folder is built by build module dinamically. You don´t need to bother about that.

I can't see what you type on your console. I can't really tell what are you doing. The complete sequence. That's what I mean by a complete ouput/log. If nothing changed after git pull, please make sure the pull succeded. Or clone it again and run everything from scratch.

I ran the sequence of commands I provided in last comment and everything worked as it should.

When you type set on windows command prompt (after set NODE_PATH=lib), it should output every environment variable defined on that prompt session. You should be able to find NODE_PATH=lib between those. If not, then there is something not working well with your environment settings. I need to be sure of that.

The build module is under lib directory... and the NODE_PATH=lib tells node where to find modules besides node_modules directory. So that clause is quite important for everything to work well. And it has never happened to me or anyone I work with (on Windows, Linux, OSX environments) to be unable to set up a project because that sentence.

Please provide your node and npm version as well as an extended output if you don't mind. It would make helping you easier.

Thanks!

@kbariotis
Copy link
Author

ok everything worked fine. please provide better forking instructions for other fellows. Development under Windows is a headache!

@cristiandouce
Copy link
Collaborator

Agree... development under Windows is a headache!
Reference to this issue troubleshot added to Readme.
Thanks!

@trentmillar
Copy link

Not sure what is happening but this isn't exactly working as described. Executing this on Windows 7 via the Github Shell;

$ npm install
$ node bin\njs-install
$ export NODE_PATH=lib
$ node index.js

Returns an error due to pathing;

$ node bin\njs-install

module.js:340
    throw err;
          ^
Error: Cannot find module 'c:\bb\nodejs-starter\binnjs-install'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

Sure sign of using DOS/Windows pathing for so long. I just changed to:

$ node bin/njs-install

@cristiandouce
Copy link
Collaborator

Does it work now?

@trentmillar
Copy link

yes.

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

3 participants