-
Notifications
You must be signed in to change notification settings - Fork 20
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
Running on Windows 10? #1
Comments
Sorry, I'm not using Windows :( Shouldn't happen anyway. I'll try to update this seed today and check if it builds on my pals laptop with Win 8.1. |
For my case it was resolved by updating project/UIBuild.scala to detect windows and set run directly from npm bin location:
and all file will be:
|
Sorry for long lack of activity here, got a new job and been pretty busy, but I've been reading a lot on the issues regarding play+ng2+webpack2 lately and I've prepared a plan for updates. Please see: #3. Any ideas, comments and critique are welcome of course. |
I'll try to incorporate this solution soon. |
I have the same problem as @hanch04 . The first error was fixed by the code from @hatemismail but even if everything compiles, I have the second problem with the 404... Any idea on how to fix that? Errors are as follow in the Console:
When I run |
I'm having the same problem. After changing the path for the process called in Workaround for now is just opening another command terminal in |
Okay, I think I got it!
if I prefix the script call to npm with this, then it works as expected- I tried deleting node_modules as well to check if the So a proper fix to make the runHooks work in a Windows environment, is to change UIBuild.scala: override def beforeStarted(): Unit = {
if (!(base / "ui" / "node_modules").exists()) Process("cmd /c npm install", base / "ui").!
}
override def afterStarted(addr: InetSocketAddress): Unit = {
process = Option(
Process("cmd /c npm run build -- --watch", base / "ui").run
)
} you'd probably want to use part of @hatemismail 's solution to check the OS and run these altered commands only in Windows. It's pretty late now but if you like I can make a pull request in the next few days, it's only a few lines. |
I'll look into this (and hopefully integrate your solution) during Easter, sorry for delay. If you have a working solution ready you can open a PR and I'll be happy to accept it. |
Yeah I'll try and collate my fixes into a PR today. |
Thank you kindly! |
Pull request made: #6 |
Hello,
I have 2 problems. I'm running on Windows 10. I have been about to get other templates working on play.
java.io.IOException: Cannot run program "npm" (in directory "C:\devsrc\play\play-ng2-webpack2-master\ui"): CreateProcess error=2, The system cannot find the file specified
Yes I do have npm installed and it is in my path.
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:9000/assets/app.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:9000/assets/vendor.js
Any thoughts?
Thanks, Chris.
The text was updated successfully, but these errors were encountered: