Skip to content

CLI fails on import of dependencies #945

@spencerkohan

Description

@spencerkohan

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

We are running into an error when we try to import json configurations for actions containing a new dependency

We are using the following command in our deployment pipeline:

 a0deploy import --input_file ./src/config --config_file

the dependencies of the config files have all been updated to use a new version of axios:

 "dependencies": [
    {
      "name": "axios",
      "version": "1.7.3"
    }
  ],

for some actions, this represents a new dependency, and for others it's just a version bump.

This command always fails with the following error:

2024-08-13T08:04:09.161Z - error: Problem running command import
118
2024-08-13T08:04:09.162Z - error: {"error":"server_error","error_description":"Compilation failed: Cannot find module 'axios'\nRequire stack:\n- /data/io/node18-actions/bd069169-68af-4c91-bbce-070f9d2d1f29/webtask.js"}

Given the fact the action is identified with a uuid, it's very difficult to know which action is actually triggering the error. From what I can understand, whatever this webtask.js process is cannot successfully access the dependency.

It's possible to make the import work by manually updating the dependencies ahead of time using the auth0 dashboard, but this is not a sustainable solution for deployments.

Expectation

I should be able to:

  1. add a new dependency to the aciton-config.json file,
  2. call a0deploy import to push it to the relevant tenant

And the result should be that the dependencies are successfully updated according to the config, and I can see them in the dashboard.

Reproduction

  1. Update the action.json config to add the new dependency
  2. Call a0deploy import --input_file ./src/config --config_file to import the updated config
  3. The command fails with an error

Deploy CLI version

7.24.1

Node version

18.20.4.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions