Dev under Windows 7
kbariotis opened this issue · 10 comments
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
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?
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.
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!
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?
@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!
ok everything worked fine. please provide better forking instructions for other fellows. Development under Windows is a headache!
Agree... development under Windows is a headache!
Reference to this issue troubleshot added to Readme.
Thanks!
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
Does it work now?
yes.