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 line 20 meteor command not found oO ( Windows 10 ) #21

Closed
cannap opened this issue Aug 16, 2015 · 20 comments
Closed

dev line 20 meteor command not found oO ( Windows 10 ) #21

cannap opened this issue Aug 16, 2015 · 20 comments

Comments

@cannap
Copy link

cannap commented Aug 16, 2015

Hi i try to get this thing working but when i use

sh dev i got

{lamb} sh dev
removing all entries of directory `assets'
removing `assets/server.bundle.js'
removing the directory itself: `assets'
 70% 1/1 build moduleshttp://localhost:9090/webpack-dev-server/
webpack result is served from http://0.0.0.0:9090/assets/
content is served from http://0.0.0.0:3000
404s will fallback to /index.html
Hash: c96b29ef80173d675486
Version: webpack 1.11.0
Time: 1446ms
           Asset    Size  Chunks             Chunk Names
server.bundle.js  148 kB       0  [emitted]  main
   [0] multi main 40 bytes {0} [built]
    + 172 hidden modules
26% 11/41 build modulesdev: line 20: meteor: command not found
Hash: 5c6fd928f9bb28c272a3
Version: webpack 1.11.0
Time: 3420ms
and more ... 

i got this 26% 11/41 build modulesdev: line 20: meteor: command not found but im 100% sure i have meteor installed right i can use meteor command everywhere

Here is a screen when i open http://localhost:9090/webpack-dev-server/

https://sc-cdn.scaleengine.net/i/6a47a558a038ca18c102c027bba005bc2.png

@cannap
Copy link
Author

cannap commented Aug 16, 2015

http://screencloud.net/v/4D61
got this to when i try too use sh met search moment

@AdamBrodzinski
Copy link
Collaborator

Hmmm I see you're on Windows.... I didn't have enough time to try this on Win7 yet. Do most Windows devs use cygwin? Is that how the bash scripts run? (windows noob 😆)

There's something wrong with the script changing directories. The meteor warning you're getting is what you get when running meteor from outside a Meteor project.

Did you happen to rename the meteor_core folder? If you ./met search moment it should cd meteor_core and then run the command.

It's also hanging up when the dev script cd back into meteor_core/.

@AdamBrodzinski
Copy link
Collaborator

@jedwards1211 I'm getting an error running the latest commit but mine barks about webpack-dev-server not being found. The server never comes up and the loading... is only displayed on the html.

meteor-webpack-react|master⚡ ⇒ ./dev
./dev: line 8: webpack-dev-server: command not found
Hash: aeb572fb1bde5f3e253c
Version: webpack 1.10.5
Time: 1607ms
           Asset    Size  Chunks             Chunk Names
server.bundle.js  148 kB       0  [emitted]  main
   [0] multi main 40 bytes {0} [built]
    + 172 hidden modules
[[[[[ ~/projects/sandbox/meteor-webpack-react/meteor_core ]]]]]

=> Started proxy.
=> Started MongoDB.
I20150816-13:46:13.397(-4)? Creating fake posts
I20150816-13:46:13.398(-4)? Creating fake users
I20150816-13:46:13.485(-4)?
I20150816-13:46:13.485(-4)?
I20150816-13:46:13.485(-4)? Running on server only
I20150816-13:46:13.487(-4)? There are # posts: 4
=> Started your app.

=> App running at: http://localhost:3000/

@cannap
Copy link
Author

cannap commented Aug 16, 2015

@AdamBrodzinski i got this error first then i installed "npm install webpack-dev-server -g" and all was fine but i have the other problem with meteor^^

@jedwards1211
Copy link
Owner

could you put pwd && in the script before the line that starts Meteor? Maybe we'll at least know it failed to switch back to that directory. What sh are you using on windows, is it via cygwin or what? I wouldn't be too surprised if that while loop in the script somehow threw things off on Windows.

@cannap
Copy link
Author

cannap commented Aug 16, 2015

#!/bin/bash
cd meteor_core && pwd && meteor $@

Same error meteor not found i have no idea i never installed cygwin or something or i forgot or something i will check this how sh is working btw what sh is calling to execute
i have no idea what i install to run sh
/e but when i add && ls && i see its in the folder http://screencloud.net/v/37wA

@jedwards1211
Copy link
Owner

@cannap I'm pretty confused, if you didn't have sh installed I wouldn't think you'd be able to run the file at all. Can you try installing Cygwin and running the scripts via the Cygwin terminal? I don't know much windows shell/powershell, but if you or anyone else does, you're welcome to port the scripts to windows.

@cannap
Copy link
Author

cannap commented Aug 16, 2015

marko@marko /cygdrive/c/Dokumente und Einstellungen/marko/Desktop/meteor-webpack-react-master
$ sh dev
„assets/server.bundle.js“ wurde entfernt
Verzeichnis wurde entfernt: „assets“ 70% 1/1 build moduleshttp://localhost:9090/webpack-dev-server/
webpack result is served from http://0.0.0.0:9090/assets/
content is served from http://0.0.0.0:3000
404s will fallback to /index.html Hash: 214621555685f69f75c1
Version: webpack 1.11.0
Time: 1223ms
Asset Size Chunks Chunk Names
server.bundle.js 148 kB 0 [emitted] main
[0] multi main 40 bytes {0} [built]
+ 172 hidden modules
Assertion failed: 0, file d:\jenkins\workspace\nodejs-msi-julien\d8c2e2bb\deps\uv\src\win\req-inl.h, line 207
dev: Zeile 20: meteor: Kommando nicht gefunden.

this is over cygwin dev is not working i need to put sh dev

and d:\jenkins\ i dont have something folder on my D:

i will try something tomorrow i have no idea

ah and i think the sh comes from the installed git :D

@AdamBrodzinski
Copy link
Collaborator

@jedwards1211 would you be open to using ShellJS to do cross platform unix scripts? I have some free time later next week and can convert them, test it out, and the if all is well merge them into master.

@cannap until we can resolve this, what if you open separate terminals and run each of these commands manually?

  ../node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.config.client.dev.js --progress --colors 
  ../node_modules/webpack/bin/webpack.js --config webpack.config.server.js --progress --colors --watch &
cd meteor_core
meteor --settings ../settings/devel.json

I was able to resolve my issues. Using a relative path to the bin files works for me. I'm assuming using npm run will look into the node_modules first then the path. I had webpack global but not webpack-dev-server.

I just submitted PR #22 to allow all the scripts to run without globals. However this wouldn't fix @cannap 's issue.

@cannap
Copy link
Author

cannap commented Aug 17, 2015

@AdamBrodzinski i found it! ;D http://screencloud.net/v/Awm6 i will explain this tomorrow here is late i n the night^^

//but im not sure i make this right i will explain later

@cannap
Copy link
Author

cannap commented Aug 17, 2015

Switch to webpack and edit devProps.js var host = '0.0.0.0' to var host = 'localhost'
Then copy the files: https://github.com/jedwards1211/meteor-webpack-react#windows-note

Go to the Root folder from this Repo create a file "dev.cmd"
put this in

rm -rvf assets
cd webpack
@start /b webpack-dev-server --config webpack.config.client.dev.js --progress --colors
@start /b webpack --config webpack.config.server.js --progress --colors --watch
cd ../meteor_core
@start /b meteor --settings ../settings/devel.json
start http://localhost:3000

open cmd writte dev press enter and all things will start

@jedwards1211
Copy link
Owner

@cannap Aha, cool, glad you got that working. Just a few warnings about these changes:

  • I believe localhost instead of 0.0.0.0 means you won't be able to test on a smartphone by entering the IP address of your dev box + :3000.
  • Sometimes meteor can finish starting up before the server webpack finishes building. Meteor should automatically load the new bundle in that case, but sometimes it caused problems for me. That's why I had the while loop in my script to wait until the server bundle is output.

I guess we could get rid of the symlinks and change the webpack config to output directly to where those symlinks are located. I can investigate soon

@jedwards1211
Copy link
Owner

whoops

@jedwards1211 jedwards1211 reopened this Aug 17, 2015
@cannap
Copy link
Author

cannap commented Aug 17, 2015

but 0.0.0.0 wont work on windows
https://www.npmjs.com/package/weinre <-- tunnel then its available in the network

@jedwards1211
Copy link
Owner

Huh, I thought Webpack was in charge of which IP addresses it listens on, but I don't know a whole lot about networking. That's a cool package, I'll have to check that out.

@jedwards1211
Copy link
Owner

I'm thinking one way to be totally cross-platform would be to just rewrite our shell scripts in JS. Does anyone know good tools for that? I'm assuming this wouldn't really be the kind of thing Grunt is for.

@AdamBrodzinski
Copy link
Collaborator

@jedwards1211 I think https://github.com/arturadib/shelljs would be a good fit 👍

@jedwards1211
Copy link
Owner

@AdamBrodzinski cool! that looks nice. Though now that I think about it, I wonder if the simultaneous execution with & would work somehow, and if all those processes would be terminated when Ctrl-Cing the script.

@AdamBrodzinski
Copy link
Collaborator

Yea I looked into it and they have an async and sync way (& is for async right?) to run processes.... not sure about cleanup with Cltrl-C though.

@jedwards1211
Copy link
Owner

I just converted the scripts to shelljs!

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