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

Axios error #160

Open
Rockyogesh opened this issue Jun 13, 2024 · 3 comments
Open

Axios error #160

Rockyogesh opened this issue Jun 13, 2024 · 3 comments
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team

Comments

@Rockyogesh
Copy link

Describe the bug

create release pipeline with command as version getting below error

2024-06-12T10:24:34.9553157Z ##[section]Starting: Run pulumi version
2024-06-12T10:24:34.9574618Z ==============================================================================
2024-06-12T10:24:34.9575351Z Task : Pulumi Azure Pipelines Task
2024-06-12T10:24:34.9576020Z Description : Azure Pipelines task extension for running Pulumi apps.
2024-06-12T10:24:34.9576632Z Version : 1.1.4
2024-06-12T10:24:34.9577316Z Author : Pulumi
2024-06-12T10:24:34.9579053Z Help : Join us on Slack at https://slack.pulumi.com.
2024-06-12T10:24:34.9579833Z ==============================================================================
2024-06-12T10:24:39.0180028Z ##[error]Unhandled: Unexpected identifier
2024-06-12T10:24:39.0221270Z ##[error]/app1/azureagent/agent23/_work/_tasks/Pulumi_66148448-e174-4167-91a4-0ac63f4a10ca/1.1.4/node_modules/axios/index.js:1
import axios from './lib/axios.js';
^^^^^
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/app1/azureagent/agent23/_work/_tasks/Pulumi_66148448-e174-4167-91a4-0ac63f4a10ca/1.1.4/version.js:32:28)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
2024-06-12T10:24:39.0271435Z ##[section]Finishing: Run pulumi version

To Reproduce
Steps to reproduce the behavior:

node version on agent v14.17.6

image

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@baoduy
Copy link

baoduy commented Jun 19, 2024

We also got the same error after the extension got upgraded automatically on 25 May.
Please help as all pipeline got impacted.

Starting: Pulumi Up Stack List
==============================================================================
Task         : Pulumi Azure Pipelines Task
Description  : Azure Pipelines task extension for running Pulumi apps.
Version      : 1.1.4
Author       : Pulumi
Help         : Join us on Slack at https://slack.pulumi.com./
==============================================================================
##[error]Unhandled: Unexpected identifier
##[error]/home/ts-ado-admin-RYaU/agent2/_work/_tasks/Pulumi_66148448-e174-4167-91a4-0ac63f4a10ca/1.1.4/node_modules/axios/index.js:1
import axios from './lib/axios.js';
       ^^^^^

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/ts-ado-admin-RYaU/agent2/_work/_tasks/Pulumi_66148448-e174-4167-91a4-0ac63f4a10ca/1.1.4/version.js:32:28)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
Finishing: Pulumi Up Stack List

@justinvp justinvp added the kind/bug Some behavior is incorrect or out of spec label Jun 21, 2024
@justinvp
Copy link
Member

Sorry for the trouble! Thanks for opening the issue.

node version on agent v14.17.6

@Rockyogesh, would it be possible to upgrade to a more recent version of Node? We have tests that are running successfully with node 16.20.2. Though, both 14 and 16 are no longer supported according to https://nodejs.org/en/about/previous-releases

@baoduy, what version of node is installed on the agent?

@justinvp justinvp added the awaiting-feedback Blocked on input from the author label Jun 21, 2024
@Rockyogesh
Copy link
Author

@justinvp I got this working by updating vsts agent version to latest that uses node16 on the agent.
earlier we had vsts agent with node version 10.
@justinvp looks like node10 should be removed from this file as it is no longer supported..
https://github.com/pulumi/pulumi-az-pipelines-task/blob/master/buildAndReleaseTask/task.json#L128C1-L130C10

just for reference:
For running any azure pipeline task node installed on agent does not get used. VSTS package is shipped with node binaries. only this binaries will be used while running azure task code(not application code eg. pulumi deployment scripts). For application code user installed node will be used.

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team
Projects
None yet
Development

No branches or pull requests

4 participants