Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI fails on import of dependencies #945

Open
6 tasks done
spencerkohan opened this issue Aug 13, 2024 · 0 comments
Open
6 tasks done

CLI fails on import of dependencies #945

spencerkohan opened this issue Aug 13, 2024 · 0 comments
Labels

Comments

@spencerkohan
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant