react icon indicating copy to clipboard operation
react copied to clipboard

Issue serving the HelloWorld page built by ReactGen (Windows 8.1 Command Prompt)

Open NickEmpetvee opened this issue 6 years ago • 3 comments

Hello There.

I built the HelloWorld app by navigating to %GOPATH%/src/example.com/helloworld and executing reactGen -init bootstrap. I then kicked off the HTTP server with gopherjs serve. It started with the following message:

C:\mcdev\gowork\src\example.com\helloworld>gopherjs serve serving at http://localhost:8080 and on port 8080 of any available addresses

Then when I navigated to http://localhost:8080/example.com/helloworld/, it served a blank page with the following error showing in the browser console and the Command prompt:

helloworld.js:1 /src/syscall/syscall_nonlinux.go:5:18: undeclared name: SYS_EXIT
(anonymous) @ helloworld.js:1
helloworld.js:2 /src/syscall/syscall.go:53:39: too few arguments in call to Syscall
(anonymous) @ helloworld.js:2

Any thoughts?

NickEmpetvee avatar May 24 '18 02:05 NickEmpetvee

Found this issue on the GopherJS project: https://github.com/gopherjs/gopherjs/issues/776. There's a comment about using a goos build argument. Not sure how that translates when we're using ReactGen...

NickEmpetvee avatar May 24 '18 03:05 NickEmpetvee

I think this is more of an issue with gopherjs on Windows than myitcv.io/react. I will try and find some time to try this out on Windows and add an AppVeyor CI build for this project.

myitcv avatar May 27 '18 16:05 myitcv

We can make a PowerShell file in the project directory like this

$env:GOOS = "darwin"
$exe = 'your directory to gopherjs.exe'

& $exe serve

run the ps1 file tempory change GOOS for this session

restful2020 avatar Jul 24 '18 17:07 restful2020