Errors trying to setup local webiny environment

Hey guys, just to clarify that Webiny uses @babel/preset-env targetting node v8.10 and greater. I myself am using node v10.14.0 on Windows.

We will soon setup a CI environment to test the entire setup on multiple versions of node so hopefully we’ll be able to find the issue.

Regarding the An error occurred error, unfortunately it requires going into AWS console, and looking at site and ssr lambdas CloudWatch logs.

Please let me know if you have any more problems/questions.

Hey Pavel,

I checked my CloudWatch and Lambda functions and could not find any site or ssr functions.

Here is a screenshot of the functions I have.

Does this look correct or is something missing?

I’m going to try creating a new project inside of WSL to see if maybe the problem is isolated to my Ubuntu 18.04 install.

Thank you for your help.

Ah man sorry, you’re talking about localhost not the deployed app. Even better; once you open your localhost site, open dev tools and check the network tab for GraphQL API calls, see if there is an error in any of them.

If you want you can also join us on Gitter for direct chat: https://gitter.im/Webiny/webiny-js

I setup Webiny on a work computer and ran into the same issue. This time I am accessing the development environment from a remote IP 10.0.0.100.

Otherwise the setup is as follows

  • Node 12.14.1
  • Ubuntu 16.04
  • Webiny 2.6.0

webiny depoly-api worked as expected
yarn start in apps/admin worked and finished installation, kept the admin section running in another tab.
yarn start in apps/site runs successfully but am running into An error occurred again.

I checked out the requests in chrome dev tools and found the error.
Here is the link to the pastebin:
https://pastebin.com/E1KVTDp6

The error message is

"message":"PbPage.findByIds is not a function"

Looks like its related to the page builder.

I also noticed that when I’m in the admin->page builder and click on the Welcome to Webiny page I get an error of TypeError: Cannot read property 'pageBuilder' of undefined. Could the two be related?

Yep, definitely related. Thanks for the detailed report. I’ll try setting up everything from scratch and let you know how it goes.

Thank you for the report and I’m sorry you had to experience this.
The issue is unfortunately related to the recent changes in the commodo library.

But we are planning to do a larger release tomorrow/Thursday, and with it, everything will work as expected I assure you. Additionally, our next step is implementing automated testing, and that will ensure these kind of issues do not repeat.

I will update you as soon as this gets resolved!

Hi @egrechko, I actually released a fix just now.

Please run yarn upgrade @commodo in your project (this is where the bug was present), and after that, completely deploy the API, via webiny deploy-api.

Let me know if you’ll have any other questions.

Hey @Adrian_Smijulj,

Thank you for the fix. I was able to get the site section to work now.

I did run into another issue but this time with the page builder. I am unable to add new blocks to pages. I can however edit and move around existing blocks.

I can also add new pages but cannot add blocks to those pages.

Here is a screenshot (when I hover over the box I don’t get a green plus)

Here is a screenshot of the AddBlock inside React Dev Tools. Looks like it renders in the top left corner.

The form builder does work. I am able to build forms with zero issues.

Do you know how I would go about diagnosing the issue?

Wow great job @egrechko, thanks a lot!

When you hover over a block, it should not look like that, it should have a big Click to Add button. Very weird… Even weirder is that everything works correctly on my setup here.

This is Chrome on Windows right? I guess @pavel could try to do the same thing on his Windows PC?

Hey Adrian,

I gave webiny a break to see if the problem resolves itself in a future update and looks like its been taken care of.

I just started a development site and everything worked out of the box right away.

Thank you for your help.

2 Likes

I have a similar error. When the “webiny deploy-api” command is executed, the webiny.js file is opened in notepad.

os: Windows 10 x64
node: 13.9.0
npm: 6.14.2
yarn: 1.22.0

Hi @Konstantin_Karlovich! This is most likely happening because you have a file association for all your .js files to be opened in notepad. Since there is a webiny.js file in the root of the project, it opens that because he thinks that’s what you want.

I also work on Windows 10, and I don’t have any file associations, and webiny command is working fine.

EDIT:
btw. I’m using Git Bash as my terminal; maybe that is also relevant.

Yes, git bash ran the command successfully. But an error occurred during its execution

 1s » dbProxy » Deploying ..

  An error occurred during deployment of dbProxy

TypeError: this.context.instance.getResourceName is not a function

That’s an old @webiny/cli. The latest is 3.2.4. Please upgrade and let me know how it goes.

Also, to avoid this problem with global CLI installations/updates, we already have a plan to avoid global CLI installation and create a create-webiny-project tool that would run through npx on-fly, so you always get the latest project setup. Bear with us, we’re working on it :slight_smile:

Actually the best thing would be to upgrade the CLI and create a new project, since I can’t tell how old is that project you’re trying to deploy. So it’s best to create a fresh one.

I did everything as you said, but a new error appeared
Sorry for that, but I need your help again :pensive:

Error: connect ENETUNREACH 169.254.169.254:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
  message: 'Missing credentials in config',
  errno: -4062,
  code: 'CredentialsError',
  syscall: 'connect',
  address: '169.254.169.254',
  port: 80,
  time: 2020-03-04T17:41:13.858Z,
  originalError: {
    message: 'Could not load credentials from any providers',
    errno: -4062,
    code: 'CredentialsError',
    syscall: 'connect',
    address: '169.254.169.254',
    port: 80,
    time: 2020-03-04T17:41:13.858Z,
    originalError: {
      message: 'EC2 Metadata roleName request returned error',
      errno: -4062,
      code: 'ENETUNREACH',
      syscall: 'connect',
      address: '169.254.169.254',
      port: 80,
      time: 2020-03-04T17:41:13.858Z,
      originalError: [Object]
    }
  }
}

That one is regarding your AWS credentials in ~/.aws/credentials file. Sorry for the DX, we’re working on it :slight_smile: You could test the credentials using this command, in your terminal: aws sts get-caller-identity

Let me know how it goes!

Also, in case you have configured your AWS credentials under a different AWS_PROFILE, please set that profile in {projectRoot}/.env.json.

Everything seems to be successfully deployed. Thanks for the help) :blush:

2 Likes

Hi, sorry to refresh this, but i seems to have the exact same issue as @egrechko, meaning “Add blocks” button.

Appart from that, nothing seems wrong, I tested severals configurations and had the exact same issue.

Configs are the following :

os: macOS 10.12
node: 13.9.0
npm: 6.14.2
yarn: 1.22.0

os: centOS 8
node: 13.9.0
npm: 6.14.2
yarn: 1.22.0

os: centOS 8
node: 12.14.1
npm: 6.14.2
yarn: 1.22.0

Appart from “Add Block” not appearing, everything else seems to work completely fine.

Any new update on that issue ?

Thank you very much !!!

Resolution : It maybe seems obvious, but, looking at the generated DOM that webiny might use properties not compatibles with previous version of Chrome. Updating Chrome solved my issue.

1 Like