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

building typescript client with docker-all fails #4700

Open
checkin247 opened this issue Jan 23, 2023 · 1 comment
Open

building typescript client with docker-all fails #4700

checkin247 opened this issue Jan 23, 2023 · 1 comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@checkin247
Copy link

Describe the bug

I have been using the docker image "azuresdk/autorest" to build the typescript autorest client,

Since recently, I get the error:

 | error: @apidevtools/json-schema-ref-parser@9.1.1: The engine "node" is incompatible with this module. Expected version ">= 17". Got "14.19.1"
  | error: Found incompatible module.

Docker usage instructions for autorest found here:
https://github.com/Azure/autorest/blob/main/docs/docker.md
Image used: https://hub.docker.com/r/azuresdk/autorest
The image was not updated in the past months. Is that the correct container repository?

command used is

autorest --typescript

in docker context.

Expected behavior
Create autorest typescript client.

Additional context
Trying to build the docker base image manually results in:

#5 2.840 Err:13 http://security.ubuntu.com/ubuntu impish-security Release
#5 2.840   404  Not Found

I have initially opened the issue at the typescript repo but since my problem is related to the docker image it seemed more accurate to file it here.

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 23, 2023
@scotchneat
Copy link

I get a similar error with the python extension, but now a newer version is expected.

The engine "node" is incompatible with this module. Expected version ">=18.0.0". Got "14.21.3"

Full output

error   | stack: Error: Package '@autorest/python' - '6.27.0' failed to install:
  Failed to install package 'https://registry.npmjs.org/@autorest/python/-/python-6.27.0.tgz' -- Error: Process Failed.

Installation logs:

  | warning: package.json: No license field
  | info: No lockfile found.
  | info:  Step: Resolving packages
  | info:  Step: Fetching packages
  | error: tsx@4.19.2: The engine "node" is incompatible with this module. Expected version ">=18.0.0". Got "14.21.3"
  | error: Found incompatible module.
  | info: Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

    at ExtensionManager.installPackage (/root/.autorest/@autorestcore@3.10.3/node_modules/@autorest/core/dist/src_lib_autorest-corets.js:17883:23)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at ConfigurationLoader.resolveExtension (/root/.autorest/@autorestcore@3.10.3/node_modules/@autorest/core/dist/src_lib_autorest-corets.js:13158:39)
    at ConfigurationLoader.load (/root/.autorest/@autorestcore@3.10.3/node_modules/@autorest/core/dist/src_lib_autorest-corets.js:13044:43)
    at AutorestContextLoader.createView (/root/.autorest/@autorestcore@3.10.3/node_modules/@autorest/core/dist/src_lib_autorest-corets.js:439:40)
    at AutoRest.RegenerateView (/root/.autorest/@autorestcore@3.10.3/node_modules/@autorest/core/dist/src_lib_autorest-corets.js:82:30)
    at currentMain (/root/.autorest/@autorestcore@3.10.3/nodemodules/@autorest/core/dist/app.js:120:21)
    at main (/root/.autorest/@autorestcore@3.10.3/nodemodules/@autorest/core/dist/app.js:289:16)

There must be an underlying dependency that's been upgraded and requires a greater node version.

I was able to fix this by updating the node version installed in the base docker image (https://github.com/Azure/autorest/compare/main...scotchneat:autorest:fix-docker-node-version?expand=1), and building the images locally. However, I'm not sure if this is a solution the maintainers would support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants