MLstate / opalang

The Opa Language for Web Application Development
http://opalang.org
Other
1.25k stars 126 forks source link

"opa create" crashes on Windows 7 #111

Open cedricss opened 11 years ago

cedricss commented 11 years ago

[update] Windows 7 users: for the moment you can copy templates from here: https://github.com/cedricss/opa-templates

On Windows 7

(it's working on Vista)

Opa 1.1.0

Bug 1

opa-create myapp

Shows an incompatibily error message, impossible to execute. Maybe because of the ".exe" extension.

Workaround:

node C:\Dev\Opa\bin\opa-create.exe --name myapp

Bug 2

C:\Users\Cédric\test>node C:\Dev\Opa\bin\opa-create.exe --name myapp
OpaCreate: Generating myapp/Makefile...
OpaCreate: Generating myapp/Makefile.common...
OpaCreate: Generating myapp/opa.conf...

OpaCreate: Generating myapp/resources/css/style.css...
Uncaught exception : Error: ENOENT, no such file or directory 'C:\Users\Cédric\t
est\myapp\resources\css'
Error: ENOENT, no such file or directory 'C:\Users\Cédric\test\myapp\resources\c
ss'
    at Object.fs.mkdirSync (fs.js:483:18)
    at global.BslFile_create_full_path (C:\Dev\Opa\lib\opa\stdlib\unix.opp\unixN
odeJsPackage.js:27:181)
    at global.BslFile_write (C:\Dev\Opa\lib\opa\stdlib\unix.opp\unixNodeJsPackag
e.js:36:48)
    at C:\Dev\Opa\bin\opa-create.exe:129:51
    at global.execute_ (C:\Dev\Opa\lib\opa\static\opa-js-runtime-cps\main.js:19:
49)
    at global.execute1 (C:\Dev\Opa\lib\opa\static\opa-js-runtime-cps\main.js:20:
50)
    at global.loop_schedule (C:\Dev\Opa\lib\opa\static\opa-js-runtime-cps\main.j
s:37:339)
    at global.launch_schedule (C:\Dev\Opa\lib\opa\static\opa-js-runtime-cps\main
.js:38:78)
    at global.push (C:\Dev\Opa\lib\opa\static\opa-js-runtime-cps\main.js:32:62)
    at global.return_ (C:\Dev\Opa\lib\opa\static\opa-js-runtime-cps\main.js:40:4
0)
cedricss commented 11 years ago

Windows 7 users: for the moment you can copy templates from here: https://github.com/cedricss/opa-templates

Shishoo commented 11 years ago

new to this, having the same win64 issues as everyone else... Also getting BUG 2... downloaded the templates, where do I put them???

cedricss commented 11 years ago

@Shishoo templates are initial project structures, ready to compile, with source examples, conf and Makefile (install make for Windows and you can type make run). Just copy a template directory (mvc-small by default) in your working directory and you can start building your app on top of this.

Shishoo commented 11 years ago

opa-make-run-error-win7-pro

Hi Cedric,

I installed gnu make, and after a little faffing around I got it to 'make'... and it generates an .exe file, however, make run generates the above error... any ideas?

cedricss commented 11 years ago

@Shishoo if it's the same error I guess you should use the same workaround: make then node myapp.exe to run it. Patch the run rule in the Makefile for convenience, so you can use make run.

brongracz commented 11 years ago

Hi I am expreiencing both - unable to run compiled via Sublime Text unable to run opa-create - bothe thesee due to the x64 x86 error message as above. While trying to create via node I get the above given bug 2.

Are you guys working on it?

A year ago everything worked but there was no book. Now I got the book but I cannot go through the first chapter because the software ceased support for Windows 7... :| Please help!

brongracz commented 11 years ago

Could switching to an older build of OPA x64 (current version is not available in x64) for Windows make any difference?

brongracz commented 11 years ago

Anybody?

hbbio commented 11 years ago

As you may have guessed, no one in the core team is using Windows. It's mostly community contributions that made it happen... and we'd love if someone could contribute here.

brongracz commented 11 years ago

It's still a bit of a problem. I think OPA should focus on extending its programming community base to support major platforms. That support is hardly a case now, which makes it very difficult to use in comparison with other frameworks and highers the entry threshold considerably. I, for example, am an enthousiast but completely green in programming. I thought opa would be a nice entry point because it incorporates couple of new technologies and concepts. Perhaps it is not mature enough yet.

wangjian30 commented 11 years ago

Hi, I solve the Bug 1 by modify the opa.bat to:

@echo off
set OLDPATH=%PATH%
set OPABASEDIRLIB=%OPABASEDIR%\lib
set OPABASEDIRMINGW=%OPABASEDIRLIB%\mingw
set MLSTATELIBS=%OPABASEDIR%
set PATH=%OPABASEDIR%\bin;%OPABASEDIRMINGW%\bin;%OLDPATH%
if "%1"=="create" (
    if "%2"=="" (
        node "%OPABASEDIR%\bin\opa-create.exe"
    ) else (
        node "%OPABASEDIR%\bin\opa-create.exe" --name "%2"
    )
) else (
    "%OPABASEDIR%\lib\opa\bin\opa-bin.exe" --no-color %*
)
set PATH=%OLDPATH%

But, I have no idea about Bug2. So I copy the template and try make it:

"### Building executable myapp.exe " opa --opx-dir _build --import-package stdlib.database.mongo --conf opa.conf --conf-opa-files -o myapp.exe --build-dir _build/myapp.exe [Finished in 3.2s]

And then I run it:

E:\Work\CurWork\Chat>node myapp.exe

module.js:340 throw err; ^ Error: Cannot find module 'myapp.controller.opx' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (E:\360浜戠洏\鍚屾鏂囦欢\Work\CurWork\Chat\myapp.exe :13:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10)

I found a myapp.controller.opx subdir under then _building. But I don't know how to make it work.

Any one help me?

Sry, My english is poor.

brongracz commented 11 years ago

Hey,

It seems like the project died young. I no longer even can find any links to precompiled builds for windows. Such a shame. I thought that it might become the next big thing in web dev.

Greetz,

Bron Bronek

hbbio commented 11 years ago

Hi,

Opa is definitely NOT dead. Windows is an environment that we don't use and its development is entirely up to the community. If anyone wants to provide a build, we will gladly host it. Also, please submit pull requests with patches related to windows and we will gladly accept them.

Henri

woodyb23 commented 10 years ago

Could someone please fix this as this is outside of my technical ability and really want to get this running on home machine. I have windows 8 on a laptop and I will try to install there to see if that works.

hbbio commented 10 years ago

Unless someone using Windows can fix the build, a suggested way is to use vagrant to deploy a linux virtual machine where you can install Opa under any operating system.

We will provide an Opa box soon.

brongracz commented 10 years ago

Hi Henri, Bradley,

What do you mean by opa box. A machine bundled with an OPA IDE?

Greets!

Bron On 18 Dec 2013 22:20, "Henri" notifications@github.com wrote:

Unless someone using Windows can fix the build, a suggested way is to use vagrant to deploy a linux virtual machine where you can install Opa under any operating system.

We will provide an Opa box soon.

— Reply to this email directly or view it on GitHubhttps://github.com/MLstate/opalang/issues/111#issuecomment-30881860 .

woodyb23 commented 10 years ago

@hbbio Never heard of vagrant before but looks promising. Can you share a vagrant file?

hbbio commented 10 years ago

We will release a vagrant box for Opa 1.1.2 in January along with a tutorial. This way, everybody will be able to access the Opa development platform.

LaravelMG-admin commented 10 years ago

Is there a way to get a a vagrant box for Opa running on a Windows 7 (32-bit) ?