Local Server error building

I’m trying to set up a local server using the instructions in Farmbot-Web-App/ubuntu_example.sh at staging · FarmBot/Farmbot-Web-App · GitHub. I’m running on a newly installed ubuntu 18.04.1 LTS Server (not desktop)

When running the sudo docker-compose run web npm run build step, I get the following errors:

ERROR in ./webpack/password_reset/on_init.ts 42:31
Module parse failed: Unexpected token (42:31)
You may need an appropriate loader to handle this file type.
| return __generator(this, function (_a) {
| switch (_a.label) {

        case 0: return [4, import("react")];

| case 1:
| React = _a.sent();
@ ./webpack/password_reset/index.tsx 40:0-35 42:33-39

ERROR in ./webpack/route_config.tsx 80:36
Module parse failed: Unexpected token (80:36)
You may need an appropriate loader to handle this file type.
| children: false,
| $: “*”,

getModule: function () { return import("./404"); },

| key: “FourOhFour”
| });
@ ./webpack/routes.tsx 35:0-48 59:26-40
@ ./webpack/entry.tsx

Unfortunately I’m not familiar with webpack, but this looks like a configuration error. Any ideas?

@I_Kill_Plants This is a bug that was discovered in the last 48 hours. We are fairly certain it is related to an NPM dependency, but have not yet deployed a fix.

1 Like

Thanks for the response. I’ll keep an eye on git for updates.

Hi!

I’ve got exactly the same issue.
Working with RAILS_ENV en dev mode, I got fist this error:

ERROR in ./webpack/css/_index.scss (./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./webpack/css/_index.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding /farmbot/node_modules/node-sass/vendor/linux-x64-64/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x

Found bindings for the following environments:

  • Linux 64-bit with Node.js 8.x

I’ll report the bug on github

@nicolas @I_Kill_Plants @derletztename BUG FIX UPDATE: The bug is fixed. It has not yet been released (you can see the fix on the staging branch on Github). We still need to do QA on the branch before we can tag a release.

1 Like

Great News @RickCarlino, thx :slight_smile:
Btw, what does QA stand for? I know it as Question and Answering at the end of a talk, but that’s probably wrong :sweat_smile:
Something with Quality maybe?

@derletztename “Quality Assurance”, which is just a fancy term to say “make sure we didn’t break old stuff while fixing new stuff”. I’m also happy to do Q&A for this release though! :stuck_out_tongue:

There was this gif this reminds me of: https://9gag.com/gag/aE20p8x :sweat_smile:

How you do the QA btw? You can’t test every function by your own. Is there a tool for that or would you like us to act as betatesters?

1 Like

@derletztename We have automated unit tests, but new features (or changes to old ones) still need to be reviewed by humans as a matter of policy. I’ll keep you posted.

:+1: Btw – I appreciate you giving us access to the source code. I was looking for a robotics project to do with my daughter, and the ability to set up and run our own local server was really the tipping point to choose farmbot. Access to the source code opened up a whole different aspect to how deep this project could go. We not only get the ultimate live-action real world video game…but we can tear it apart and see how all it all works.

So I wanted to give you a well deserved thank you.

5 Likes

Thx for mentioning us :slight_smile: :

Fix bug noted by @HamishWHC @derletztename and forum user I_KILL_PLANTS . Thanks for your help!

That means it’s done and we can download and test it now?

@derletztename Not yet. It is not merged yet. There are still some discussions/final checks happening internally.

You can subscribe to that PR and re-upgrade when it is merged.

Really important side note: Once the PR is merged, you will need to run the following to upgrade:

  git pull https://github.com/FarmBot/Farmbot-Web-App.git master
  sudo docker-compose build # <== THIS IS A NEW STEP
  sudo docker-compose run web bundle install
  sudo docker-compose run web npm install
  sudo docker-compose run web rails db:migrate

@derletztename @I_Kill_Plants @nicolas The release is up. You may upgrade by running the commands in the message above. Thanks for everyone’s help in identifying the issue.

1 Like

Using this update, I was able to successfully build and run the web app (Ubuntu desktop 18.04.1)

Thanks for the help!

3 Likes

I’m trying it today.

Finally found some time for the upgrade and it worked perfectly. It’s up and running again and all the database data is still there in the right place :blush:

Thx @RickCarlino and team, great work :+1:

1 Like