Open srcspider opened 10 years ago
cc @Acconut
Well, that's a wired issue. Normally this should be prevented by https://github.com/hoodiehq/hoodie-cli/blob/master/lib/hoodie/util/git.js#L9. I assume you have executed hoodie new app
, haven't you?
Yes.
Have you tried it using the default command line on windows (cmd.exe)? I was unable to reproduce your issue.
I just tried it now. Same issue.
I would like to point out that I've never seen anyone actually use the cmd.exe command line for actual "work" on windows, ever. It's always some alternative command line such as a dresser program, power shell (or whatever it's called), cygwin equivalent, etc.
I'll try and diagnose it for you since I have some time. [edit] In my hoodie-cli located at C:\Users\srcspider\AppData\Roaming\npm\node_modules\hoodie-cli\lib\hoodie\util
I do not actually have a git.js
file as the example you just linked. For reference using these install instructions: http://hood.ie/#installation Re-installed and still don't see it. This might be the issue, note the WARN there:
$ npm install -g hoodie-cli
...
npm WARN package.json github-url-from-git@1.1.1 No repository field.
hoodie-cli@0.4.8 C:\Users\srcspider\AppData\Roaming\npm\node_modules\hoodie-cli
├── underscore@1.5.2
├── graceful-fs@2.0.1
├── ini@1.1.0
├── colors@0.6.2
├── open@0.0.4
├── async@0.2.9
├── rimraf@2.2.2
├── semver@2.2.1
├── shelljs@0.2.6
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.8)
├── prompt@0.2.12 (revalidator@0.1.6, pkginfo@0.3.0, read@1.0.5, utile@0.2.1, winston@0.6.2)
├── update-notifier@0.1.3 (semver@1.1.4, request@2.12.0, configstore@0.1.7)
├── cli-color@0.2.2 (memoizee@0.2.6, es5-ext@0.9.2)
└── npm@1.4.2
The warn is harmless, but can you try running npm install
inside your app directory?
On 22.03.2014, at 22:34, srcspider notifications@github.com wrote:
I just tried it now. Same issue.
I would like to point out that I've never seen anyone actually use the cmd.exe command line for actual "work" on windows, ever. It's always some alternative command line such as a dresser program, power shell (or whatever it's called), cygwin equivalent, etc.
I'll try and diagnose it for you since I have some time. [edit] In my hoodie-cli located at C:\Users\srcspider\AppData\Roaming\npm\node_modules\hoodie-cli\lib\hoodie\util I do not actually have a git.js file as the example you just linked. For reference using these install instructions: http://hood.ie/#installation Re-installed and still don't see it. This might be the issue, note the WARN there:
$ npm install -g hoodie-cli ... npm WARN package.json github-url-from-git@1.1.1 No repository field. hoodie-cli@0.4.8 C:\Users\srcspider\AppData\Roaming\npm\node_modules\hoodie-cli ├── underscore@1.5.2 ├── graceful-fs@2.0.1 ├── ini@1.1.0 ├── colors@0.6.2 ├── open@0.0.4 ├── async@0.2.9 ├── rimraf@2.2.2 ├── semver@2.2.1 ├── shelljs@0.2.6 ├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.8) ├── prompt@0.2.12 (revalidator@0.1.6, pkginfo@0.3.0, read@1.0.5, utile@0.2.1, winston@0.6.2) ├── update-notifier@0.1.3 (semver@1.1.4, request@2.12.0, configstore@0.1.7) ├── cli-color@0.2.2 (memoizee@0.2.6, es5-ext@0.9.2) └── npm@1.4.2 — Reply to this email directly or view it on GitHub.
Ok, the problem is that the version published on npm doesn't include the necessary fix (https://github.com/hoodiehq/hoodie-cli/commit/301958229c911b2cd00216690c50d050995da7e1).Until someone publishes the latest version you need to install it from GitHub: npm install -g git://github.com/hoodiehq/hoodie-cli.git
This is why we need https://github.com/hoodiehq/discussion/issues/19
The url for the fix is invalid @Acconut
Fixed, thanks
Tested and workaround works on my end.
That said hoodie start
fails at fs.js:427
with Error: ENOENT, no such file or directory 'e:\testproj2\data\couch.pid'
. CouchDB is installed according to default instructions and unless I'm interpreting it wrong the futon web interface seems to indicate everything about it is working. Is there anything I'm missing? Since your instructions specify default behavior should work out of the box and configuration instructions for couchdb itself should not be required.
Did you start couchdb yourself? Hoodie doesn't require you to do so since it starts couchdb automatically. Please stop couchdb and try again.
The default behavior on windows when you install couch is "Install as service" and "Start service automatically." Haven't done anything special other then following the basic install instructions they have.
Hoodie starts a separate CouchDB instance on a different port than the default installation, so they don't interfere with each other. The hoodie start output tells you the port that CouchDB was started with.
There is no need to stop the default installation, but it also won't be used by Hoodie :)
On 23.03.2014, at 00:14, srcspider notifications@github.com wrote:
The default behavior on windows when you install couch is "Install as service" and "Start service automatically."
— Reply to this email directly or view it on GitHub.
Builds have always been smooth on my mac but I'm bumping into the same CouchDB error in fs.js:427
trying to start and app on a Win 7 x64 machine at work similar to the one mentioned above (tried clearing hoodie and npm cache and installing from git rather than npm with the same result). The entire error on startup is the following:
Version: 0.4.10 (node v0.10.24, npm 1.3.21, platform: win32)
Initializing...
CouchDB started: http://127.0.0.1:6006
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
Stopping CouchDB...
fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory 'C:\Code\Source\user\app2\data\couch.pid'
I can continue to play with this on a Mac but was hoping since this appears to build new hoodie apps successfully now to do basic development on windows as well if it's just a simple configuration/port tweak I'm missing (CouchDB is installed and running just fine on the default port 5984).
I'm not sure if this is still an issue for windows machines, but while digging through the cli code I saw there are manually concatenated paths (e.g. https://github.com/hoodiehq/hoodie-cli/blob/master/lib/hoodie/new.js#L246), maybe using path.join
helps resolving this (or at least other windows related issues).
@boennemann I think using path.join
could work here. Wanna create a PR for that?
Sure, I'll have a look this evening.
To be honest I don't think that's the problem since node can handle paths containing both, front- and backslashes. @alittle CouchDB needn't be started to run hoodie. It will find its binary and start an own instance to use.
Having the same issue here, everything freshly installed (on Win8)
According to the error output, we're missing couch.pid
file in the data
folder;
Would the Hoodie Scaffold be bad on Windows? I can confirm this file exist when I scaffold a new app on OSX
Thanks for all of the quick responses already. I'll have to give these ideas another go when production work cools down next week ;-) I did make some progress that same day by entering the environment path variables per @zipzit 's comment near the bottom of this thread not sure if they will help you @OClement but might be worth a try.
Thanks for the response @alittle, unfortunately it doesn't seem to help my case
Been looking around a bit more and check what is happening here; If I understand correctly, the error we get (non-existing couch.pid) is not the root of the problem, and this file probably is created when the couch server instance gets actually created.
I think the problem is at least two-fold:
Some couchDB error happens (duh! - that's the first error), and the course of action in that case is to kill the related couch process. Normally, the couch.pid
file should have been created, and the app tries to read that file, cannot because for some reason was not created in the first place, and Node throws the error we're seeing.
I'm not sure why it feels it needs to kill that process in the fist place; Seems like the stacktrace isn't long enough to lead us there.
Unfortunately I have limited experience when it comes to developping Node Apps, hopefully someone with more knowledge will be able to shed some light in here
Ouch. I wish I could help you guys more. I got busy on other stuff and hood.ie got sent to the back burner. I've not looked at the code in months. Apologies... LB, Las Vegas Nevada USA.
From: OClement notifications@github.com To: hoodiehq/my-first-hoodie my-first-hoodie@noreply.github.com Cc: zipzit zipzit@yahoo.com Sent: Thursday, May 15, 2014 6:12 PM Subject: Re: [my-first-hoodie] Windows Installation Fails (#49)
Thanks for the response @alittle Been looking around a bit more and check what is happening here; If I understand correctly, the error we get (non-existing couch.pid) is not the root of the problem, and this file probably is created when the couch server instance gets actually created. I think the problem is at least two-fold: Some couchDB error happens (duh! - that's the first error), and the course of action in that case is to kill the related couch process. Normally, the couch.pid file should have been created, and the app tries to read that file, cannot because for some reason was not created in the first place, and Node throws the error we're seeing. I'm not sure why it feels it needs to kill that process in the fist place; Seems like the stacktrace isn't long enough to lead us there. Unfortunately I have limited experience when it comes to developping Node Apps, hopefully someone with more knowledge will be able to shed some light in here — Reply to this email directly or view it on GitHub.
I tested it on my windows 7 machine and it worked like a charm. I assume your environment variables may cause it.
These are mine:
COUCH_BIN: 'D:\\Programme\\CouchDB\\bin\\couchdb.bat',
COUCH_DEFAULT_INI: 'D:\\Programme\\CouchDB\\etc\\couchdb\\default.ini',
I've installed CouchDB to D:\\Programme\\CouchDB
.
I've tried it now on a blank windows 8 machine and ran into the same issue. I assume it's a problem with multicouch not finding the binary.
I'll investigate.
I've found the issue: https://github.com/hoodiehq/node-multicouch/blob/master/lib/multicouch.js#L17
I'll assume you have a 64-bit machine and therefore process.arch
isn't x86 and win_bin
will be c:/program files/apache ...
. But Apache only offers x86-builds for windows. You can fix it manually doing something like:
win_bin = 'C:\\Program Files (x86)\\Apache Software Foundation\\CouchDB\\bin\\erl.exe';
Tell me whether it helps. I'll make a pull request soon.
So is there a definite resolution to this? I have a x64 Windows 7 installation currently, but installed CouchDB as x86 so the erl.exe lives in this path C:\\Program Files (x86)\\Apache Software Foundation\\CouchDB\\bin\\erl.exe
.
I've also tried to install hoodie-cli via npm install -g git://github.com/hoodiehq/hoodie-cli.git
.
When I try running the hoodie new myfirstapp --verbose
, the issue I am getting is:
Cloning into 'C:\Users\jamez\.hoodie\cache\my-first-hoodie' ... fatal: unable to access 'https://github.com/hoodiehq/my-first-hoodie.git/': Could not resolve proxy: %HTTP_PROXY% - Could not fetch project from https://github.com/hoodiehq/my-first-hoodie.git/
Of course I tried cleaning my NPM & hoodie cache with no luck :( Also I've had both NPM and Git installed and both have been working great for over a year.
@jamez14 The issue you're having is different from the one discussed here. You seem to have a problem with hoodie-cli but I'll have a look.
Do you use a proxy? Please try running git clone https://github.com/hoodiehq/my-first-hoodie.git 'C:\Users\jamez\.hoodie\cache\my-first-hoodie' --depth=1
. If this succeds you can continue with hoodie new app
.
@Acconut thanks!
Also, I did one of the fixes from #85 in which I added the folder my-first-hoodie
to the .hoodie/cache
directory but then get stuck at the same spot as the poster did. I'll redirect my "thoughts" to that issue.
@jamez14 Did it work now?
@Acconut unfortunately not completely. Here's what it looks like on my end...
@jamez14 I'm not sure what produces this error but in the meantime you can create a hoodie app by yourself using these commands: https://gist.github.com/Acconut/8f5853b62d9929de87db#file-new-bat
@Acconut awesome, thanks for that!
Windows Installation If you don't accept the default installation folder then basically you're screwed - the installer should do much better. A slightly more detailed answer + correction of typos is:
After installing all the modules, head to the root of the website, open .\node_modules\hoodie-server\node_modules\multicouch\lib\multicouch.js.
Edit line 17 and set this to wherever you have installed couchDB win_bin = 'C:\Program Files (x86)\Apache Software Foundation\CouchDB\bin\erl.exe';
It is indeed a prerequisite of Hoodie to expect CouchDB to be installed in the default location. We should make that clear in the docs.
I filed https://github.com/hoodiehq/node-multicouch/issues/26 to help solve this in the underlying component. If anyone could help figure this out, we can support any install location. Any help would be very appreciated! <3
Hello! does this has a solution? getting the same error on my win10 x64 laptop
@websus this repository is outdated. Can you please try npm uninstall --global hoodie
, and then try to setup our new starter app instead: https://github.com/hoodiehq/hoodie-app-tracker
I have a pretty good idea looking at the
C:\Program
what the error is. But I'm sure you know where it is and how to fix it. For reference, windows 7 x64, git bash: