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

Does not build on Windows #22

Closed
davidpodhola opened this issue Jan 11, 2017 · 10 comments
Closed

Does not build on Windows #22

davidpodhola opened this issue Jan 11, 2017 · 10 comments

Comments

@davidpodhola
Copy link
Contributor

When I cloned the repo, it does not build on my machine where otherwise I use fable.

I am pretty sure it is because I miss something and generally I am too pedantic on the DevOps (does that still exist?).

Building: C:\Users\david.podhola\Documents\S\fable-elmish\src\elmish
C:\Users\david.podhola\Documents\S\fable-elmish\packages\Npm.js\tools\npm.cmd run build
Running build failed.
Error:
System.Exception: Start of process C:\Users\david.podhola\Documents\S\fable-elmish\packages\Npm.js\tools\npm.cmd failed. The system cannot find the file specified

capture

@et1975
Copy link
Member

et1975 commented Jan 11, 2017

That's true, the build infrastructure is weak ATM and it doesn't build on Windows.
Partially because I use OSX and partially because I don't believe paket should be installing npm as my local dependency. Also, I've switched a while ago to yarn, so even if it worked, it wouldn't be doing a proper job, i.e. a reproducible build.

Having said that, running yarn build in each of src subfolders (starting with elmish) should build on Windows (it did, last time I tried).

Thanks for bringing it to my attention again, I need to have a better build script and Travis/AppVeyor to go with it.

@MangelMaxime
Copy link
Member

We was having the same problem for fable-arch.
If you upgrade Fake to a certain version, them it will look for npm.bat in your PATH variable.

Here is the commit fixing the problem for Fable-arch: fable-compiler/fable-arch@9aaf39d

@davidpodhola
Copy link
Contributor Author

davidpodhola commented Jan 11, 2017

Thanks @et1975 and @MangelMaxime . Yes, I also do not believe npm should be installed locally. I have npm installed, but for some reason it is not detected by FAKE (?)

Anyway in samples it seems cp is used so it would not run anyway even with yarn I assume.

@et1975
Copy link
Member

et1975 commented Jan 11, 2017

cp is used

Ah, yes... unless cp is an alias in PowerShell? Can't wait for linux subsystem to become mainstream on Windows :)

Anyway, even as it is, it's easy to fix - since all the web samples use webpack2 it would be fairly straightforward to either pack the styles from the node_modules or add a plugin to do the copying.

@davidpodhola
Copy link
Contributor Author

OK, thanks for the info will have a look at that next week.

et1975 pushed a commit that referenced this issue Jan 11, 2017
@et1975
Copy link
Member

et1975 commented Jan 15, 2017

If you check my fork, you'll see I've switched the build to yarn, it builds on AppVeyor and TravisCI now. Got into a weird Fable build problem trying to consolidate dev dependencies, but fake script is fine now.
The samples take a long time to build, so I'll keep them as an optional target. Still would like to see them building on Windows, so I'd appreciate the effort there!

@et1975
Copy link
Member

et1975 commented Jan 16, 2017

The elmish projects should build now (see the updated readme).

@davidpodhola
Copy link
Contributor Author

build.cmd without parameters works now, great, thank you @et1975!
samples do not build; it is not only matter of cp, there are other path-related issues I think.

Will need to look at this more

capture

@et1975
Copy link
Member

et1975 commented Jan 17, 2017

that was an error in fable-elmish-react@0.8.1, please upgrade to 0.8.2.
... I should unlist it.

@davidpodhola
Copy link
Contributor Author

Confirm, after upgrade it works. Now I try to test the react native samples on Windows too, but I think this is a different story so closing here, thanks again!

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