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

Support "Bash on Windows" #7583

Closed
ilan-schemoul opened this issue Aug 4, 2016 · 25 comments
Closed

Support "Bash on Windows" #7583

ilan-schemoul opened this issue Aug 4, 2016 · 25 comments

Comments

@ilan-schemoul
Copy link

ilan-schemoul commented Aug 4, 2016

Hello, I updated W10 to anniversary edition and so I downloaded meteor 1.4.0.1 via linux command of your website (curl | sh), check that I've python, gcc as the C compiler (+ sudo apt upgrade/update) but either on old project or newly created projects with the brand new ubuntu shell I got with sudo meteor :
Unexpected mongo exit code 100. Restarting. Unexpected mongo exit code 100. Restarting. Unexpected mongo exit code 100. Restarting. Can't start Mongo server. MongoDB had an unspecified uncaught exception. This can be caused by MongoDB being unable to write to a local database. Check that you have permissions to write to .meteor/local. MongoDB does not support filesystems like NFS that do not allow file locking.
if I ommit sudo I have an
=> Started proxy. Unexpected mongo exit code 14. Restarting. Unexpected mongo exit code 14. Restarting. Unexpected mongo exit code 14. Restarting. Unexpected mongo exit code 14. Restarting. /home/NitroBAY/.meteor/packages/meteor-tool/.1.4.0-1.13j49n2++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:165 throw error; ^ Error: EACCES: permission denied, mkdir '/home/NitroBAY/.meteor/packages/npm-bcrypt/.0.8.7.1yuta2i++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-pwr33q' at Error (native)

@abernix abernix changed the title Windows subsystem for linux Windows 10 Anniversary Edition Support Aug 5, 2016
@abernix
Copy link
Contributor

abernix commented Aug 5, 2016

I don't believe this has been tested at all yet and I'm not even remotely surprised that it doesn't work out of the box.

I would recommend using the traditional Windows installer for now if you are eager to use Meteor on Windows. But by all means, please do try to help figure out what's wrong and submit a proposal for making it work. I'm sure many Windows users would appreciate it, but I don't know if this is going to get a lot of attention right away.

My first question would be if you can setup your own Mongo server on that machine and then get Meteor to use it by specifying the environment variable MONGO_URL=mongodb://localhost:27017/meteor. It's possible that the Mongo binary Meteor has bundled just isn't compatible with Windows 10 and won't start.

But again, this is only speculation and there is probably a lot more that could be wrong / needs to be looked into.

@ilan-schemoul
Copy link
Author

ilan-schemoul commented Aug 5, 2016

Okay, I'm glad that you're interested by this problem. But the problem is that some actually makes windows's linux shell working with meteor : http://tomgrek.com/post/meteor-on-windows-bash/ (and he told about his article here https://forums.meteor.com/t/linuxs-meteor-install-now-works-natively-on-windows/21954) and @heberallred said he make it works on #5091

@ilan-schemoul
Copy link
Author

Also I tried to change permissions of .meteor recursively both via linux and via windows explorer but that didn't change my problem, so as you said I could reinstalling windows installer (especially that I'm already late on a project) but that's really tough and sad

@ilan-schemoul
Copy link
Author

Didn't succeed to install mongo. I'm under ubuntu 14.04, I followed that https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ and sudo service mongod start give me mongod: unrecognized service

@laosb
Copy link
Contributor

laosb commented Aug 5, 2016

@NitroBAY You can try to start your MongoDB instance on Windows using Win binaries, and then specify the MONGO_URL to the instance on Windows.

@turbobuilt
Copy link

turbobuilt commented Aug 7, 2016

perhaps try installing it to a different location. I put my projects in a folder on the C drive which in WSL is /mnt/c/projects instead of the home directory. I'm also still on 1.3.5.2

@ilan-schemoul
Copy link
Author

Finally mongodb is working but I can't get working 1.4 + subsystem exactly like https://forums.meteor.com/t/1-4-app-successfully-building-in-windows-10-bash/27552

@ilan-schemoul
Copy link
Author

ilan-schemoul commented Aug 23, 2016

It's working now. YAY the compilation seems faster. That plus the 1.4.2 which should (finally) focus on compilation time, Meteor could be really bearable on a daily basis :D 👍 (hard to focus when I have to wait 1 min for every changes)

@ilan-schemoul
Copy link
Author

ilan-schemoul commented Aug 25, 2016

I don't know why but the bug is back. Either I try to launch my project on my windows drive (/mnt/c) but Unexpected mongo exit code 100. Restarting. (even with sudo, even with admin right to the bash). Either I create a project into linux but then when I change something windows side on (AppData\Local\lxss) the changes ARE NOT DETECTED by linux. ALL was working great but since days the bug I described above is back AND I waste days into that without solving anything....
PS : I already fully uninstall meteor/linux. I really need help...
EDIT : dozens of people have the same problem https://forums.meteor.com/t/linuxs-meteor-install-now-works-natively-on-windows/21954/21
EDIT2 : if I run meteor first on Windows it can works after that on linux. All began to bug when I try to meteor shell on bash. I hope someone could find a full bash solution about Meteor :D. Currently the bash support feel like more a bug than a feature.

@musosoft
Copy link

musosoft commented Sep 2, 2016

I started to have the same issue recently. if I run meteor it throws error: Unexpected mongo exit code 14. Restarting. With sudo it has exit code 100

@ilan-schemoul
Copy link
Author

ilan-schemoul commented Sep 20, 2016

If I put my project in home of windows bash changes aren't detected so I can't edit my code.
If I try to launch my project under /mnt/c (windows partition) Meteor will not run because linux can't rewrite what meteor Windows has written.
So the workaround could be to delete .meteor/local of a /mnt/c project and to run meteor on bash, but mongo isn't working nor shell etc. And I don't think I can update, so yeah we wait for a response of MDG because I'll not use linux on Windows if I can't use Meteor (obviously) but I wait for that moment since too long and that would really increase productivity so I hope 1.4.2 will take care of it as it's in the logic of performance optimization.
MDG please take seriously care of this issue. This is a major one who could greatly increase our productivity and you could in future drop windows support.

@abernix abernix mentioned this issue Oct 4, 2016
@ilan-schemoul
Copy link
Author

Please if you can do test on W10, we would be so glad to use linux on Windows !

@musosoft
Copy link

musosoft commented Nov 6, 2016

The older 1.3 meteor branch works under WSL, just downgrade until MDG will fix the new mongo version in 1.4 branch.

meteor create PROJECT_NAME --release 1.3.5.1

@abernix abernix changed the title Windows 10 Anniversary Edition Support Support "Bash on Windows" Nov 21, 2016
@ilan-schemoul
Copy link
Author

ilan-schemoul commented Dec 7, 2016

As I think it's interesting enough, here's what @abernix said on another report about bash on windows

Thanks for filing an issue. There is no reason for this very basic, non-cross-device operation to fail.

The very likely reason that this is happening is that you are using "Bash on Windows" which is still incomplete and has an official warning that you should expect "some things to work and for many things to fail".

I attempted for several hours to get Meteor working with BashOnWindows over the weekend and ran into numerous problems with seemingly basic tasks. For example node-gyp install, a very basic command which simply downloads and extracts the node headers into a directory fails because of a bizarre data flow error.

I was able to work around many things by doing things that I shouldn't have to had done (copying files manually, etc.), but the bottom line is: Bash on Windows is not ready.

There are a lot of known problems, and several which were only fixed by switching to the "Insider" builds which are not automatically released. Many filesystem issues are fixed only in internal Microsoft builds.

You may have better luck if you run Bash as administrator but you shouldn't have to if everything is working properly. Unless you are able to reproduce this problem with bash on a stable version of actual Ubuntu, you'll probably need to open this issue with Microsoft. For what it's worth, they do seem really eager to get it all working and are closing issues on a regular basis.

I think the only reasonable option here is to wait until Microsoft stabilizes the release and I think #7583 is a sufficient issue to wait for that to happen.

I'm glad to have a report on the situation about bash on Windows + Meteor, thanks @abernix to have investigated this issue.

@turbobuilt
Copy link

It may be that 1.4 requires inotify support, which will be added at some point to release builds of windows 10
https://blogs.msdn.microsoft.com/commandline/2016/10/07/wsl-adds-inotify-filesystem-change-notification-support/

@abernix
Copy link
Contributor

abernix commented Dec 8, 2016

Thanks for cross-posting that, @NitroBAY, I had meant to do that but forgot.

I hope I was clear: I do think this can all get worked out eventually and there might be some changes that Meteor needs to make in order to finally work, but as of right now I had to throw my hands up especially since I don't actively work on Windows and BashOnWindows isn't open-source so it could be further debugged by the community.

@mizzao
Copy link
Contributor

mizzao commented Dec 20, 2016

@musosoft can you clarify what you mean by '1.3 works under WSL'?

For example, do you put your project under /home or /mnt/c? What do you edit the files with? This confounds me, because

  • if you put the files in the WSL filesystem, apps running in Windows will not be able to edit the files directly (e.g. WIndows directory of the linux subsystem microsoft/WSL#402 (comment))
  • on the other hand, if you put the files under /mnt/c, Meteor's file watcher will expect a Linux FS but since it will actually be Windows, and won't work properly.

Has anyone actually tried running meteor on WSL while editing the files from a normal Windows app? If so, what works?

@mizzao
Copy link
Contributor

mizzao commented Dec 21, 2016

Just wanted to follow-up on my last comment. Under some basic testing, Meteor 1.3.5.1 seems to work fine with the project under /mnt/c being edited by Visual Studio Code, with meteor itself running under WSL bash. Basic file changes work on both client and server, and rebuild times aren't horrible.

Haven't tested 1.4.x yet, but would be interested in the build optimizations in 1.4.2 if those improve performance further. Will report back with any additional findings.

@ilan-schemoul
Copy link
Author

Oh yeah so I wasn't crazy, Meteor used to work and to detect changes under /mnt/c.

@ilan-schemoul
Copy link
Author

So ... as Windows added inotify support on Insiders builds Meteor on windows on bash is working now on Insiders build ?
Because next month the update "creators update" is going to be deployed. And if we could run Meteor from the bash then it would be pretty amazing.

@ilan-schemoul
Copy link
Author

Well I still have mongo error (14/100) even after the creator update.

@lobosan
Copy link

lobosan commented May 4, 2017

Same here. Is there any way to fix it?

@hwillson
Copy link
Contributor

hwillson commented Jun 7, 2017

To help provide a more clear separation between feature requests and bugs, and to help clean up the feature request backlog, Meteor feature requests are now being managed under the https://github.com/meteor/meteor-feature-requests repository.

Migrated to meteor/meteor-feature-requests#154.

@hwillson hwillson closed this as completed Jun 7, 2017
@mizzao
Copy link
Contributor

mizzao commented Jul 18, 2017

Following up on my earlier post, Meteor 1.5 does not work using WSL for a project under /mnt/c. It shows the following error, possibly due to the inotify support above.

Unexpected mongo exit code 100. Restarting.   
Unexpected mongo exit code 100. Restarting.   
Unexpected mongo exit code 100. Restarting.   
Can't start Mongo server.                     
MongoDB had an unspecified uncaught exception.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. MongoDB does
not support filesystems like NFS that do not allow file locking.

@mizzao
Copy link
Contributor

mizzao commented Jul 19, 2017

I'd recommend everyone who is following this thread to post their latest experiences over at meteor/meteor-feature-requests#154 to see if we can get Meteor working on WSL again.

@meteor meteor locked and limited conversation to collaborators Jul 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants