pulumi / pulumi-az-pipelines-task

Azure Pipelines task extension for running Pulumi apps.
https://marketplace.visualstudio.com/publishers/pulumi
Apache License 2.0
26 stars 19 forks source link

Axios error #160

Open Rockyogesh opened 1 month ago

Rockyogesh commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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?