Wails: react template build error

Created on 18 Jun 2019  路  10Comments  路  Source: wailsapp/wails

Description

can not build react template

To Reproduce
download wails 0.16.0:

  1. wails init
  2. select React Js
  3. try building the generated hello world cd projectName && wails build
  4. see error

Expected behaviour
Build hello world

Screenshots
wails_error
wails_npm_log

System Details

| Name | Value |
| ----- | ----- |
| Wails Version | v0.16.0 |
| Go Version | go1.12.5 |
| Platform | linux |
| Arch | amd64 |
| GO111MODULE | (Not Set) |

Additional context
The fix seems to be removing everything inside production array. Since the "browser" is webview is alright.

https://github.com/wailsapp/wails/blob/master/cmd/templates/create-react-app/frontend/package.json.template

"browserslist": {
    "production": [
],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
In Progress bug

Most helpful comment

Autocorrect on phone :joy:
I did not see this on Mac

All 10 comments

I did mother this on mac

??

Autocorrect on phone :joy:
I did not see this on Mac

122 hopefully fixed the issue

the problem persisted even after the bugfix, mainly cause the fix was for production build and now the problem seems to also be happening in serve mode.

the quick fix again would be to remove everything, this time, from the development field

"browserslist": {
    "production": [],
    "development": []
  }

I might push that for now, but it certainly doesn't feel right and will investigate more to find a proper solution.
What do you think?

Does wails serve still work with this fix?

yes, I am using it right now in fact with chromium on ubuntu.

It's so cool that people are finding this feature useful.

I really don't want to spend much more time on the template. I am pulling one more time with the quickfix and let's hope that will do it for now.

for future reference: in case a similar ticket opens in the future see suggested steps as described here #126

Was this page helpful?
0 / 5 - 0 ratings