How Can I Resolve the "Cannot Read Properties of Undefined" Error in a Node Scenario?

This topic was automatically generated from Slack. You can find the original thread here.

hi team! I’m getting an error on one of our Node scenarios. could I get some help please?

TypeError
Cannot read properties of undefined (reading ‘execute’)

TypeError: Cannot read properties of undefined (reading 'execute')
    at Runner.runWorker (file:///var/task/lambda_handler.mjs:736:8)
    at async Runner.processCell (file:///var/task/lambda_handler.mjs:773:16)
    at async Runner.runUserCode (file:///var/task/lambda_handler.mjs:914:9)
    at async Runner.run (file:///var/task/lambda_handler.mjs:745:5)
    at async Runtime.handler (file:///var/task/lambda_handler.mjs:967:22)

from my dev:

It looks like they are using AWS lambda to run these actions. The lambda needs to build the environment in order for this to execute. It seems that this is what has gone wrong. The page that I sent you mentions changing the node version and checking npm packages. It looks like the only option for node version is 20.x and the only npm import is

import axios from ‘axios’

since sending the above, they’re now reporting getting:

Now I get this

ModuleNotFoundError
No module named ‘pkg_resources’

Traceback (most recent call last):

File “/nano-py/server.py”, line 56, in
worker = Worker(root, deployment)
^^^^^^^^^^^^^^^^^^^^^^^^

File “/nano-py/pipedream/worker.py”, line 100, in init
self.load()

File “/nano-py/pipedream/worker.py”, line 119, in load
self.step_modules[cell[“id”]] = importlib.import_module(cell[“importPath”])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “/var/lang/lib/python3.12/importlib/init.py”, line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “”, line 1381, in _gcd_import

File “”, line 1354, in _find_and_load

File “”, line 1325, in _find_and_load_unlocked

File “”, line 929, in _load_unlocked

File “”, line 994, in exec_module

File “”, line 488, in _call_with_frames_removed

File

>

and then:

It won’t let me update the max memory either

Hi Alex,

Yes, that’s correct. We’ve recently upgraded all workflows to Node v20.

axios is compatible with Node v20, so that alone isn’t causing these issues.

We need more details about your workflow in order to give more guidance. Can you share the specific code from the Node step that’s throwing these errors?

thanks Piece, am I ok to DM a pastebin link?

Is your workspace on a Business subscription?

I don’t think so

If so, we can set up a private Slack channel between your team and Pipedream staff

You can check by looking in the bottom left hand corner of the Pipedream dashboard

we are not

Got it, sorry support over private chat is available at the Business tier and above.

But if you can provide samples of code and screenshots here, we can help give you guidance.

sure, thanks. this is the step:

it was working fine until the weekend, when a different step was updated, and now got the above problems

Thanks. Are these errors happening in the deployed workflow on production events, or while you’re developing the workflow?

If the former, have you tried testing the workflow with a new event and redeploying?

getting them with both

the test step was working, and then stopped working seemingly at random

Can you share the URL to the workflow? I just need the p_************ portion in particular.

it’s in a legacy Workflow, rather than a Project - which bit of the URL do you want?

That’s ok, the p_************ is the unique ID of the workflow. It should be in the URL when you have the workflow opened either in the inspector or builder views.