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

Corepack runs into an internal error with newest iron node image [Proxy issue] #447

Open
Chreggii opened this issue Apr 2, 2024 · 4 comments

Comments

@Chreggii
Copy link

Chreggii commented Apr 2, 2024

When I try to install pnpm with corepack I get the following error with node image node:iron@sha256:04223c46b1b8998bccbb6e6208dbed8344916ffc1be9f446109ffcb9629ad791:

$ npm config set //$CI_SERVER_HOST/:_authToken $CI_JOB_TOKEN $ https_proxy=$CODE_PROXY corepack prepare --activate && corepack enable Preparing [email protected] for immediate activation... Internal Error: Error when performing the request to https://registry.npmjs.org/pnpm/-/pnpm-8.15.6.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting at fetch (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22882:11) at async fetchUrlStream (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:2[29](https://code.siemens.com/automation-core/ac-engineering/-/jobs/174743095#L29)14:20) at async installVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:2[30](https://code.siemens.com/automation-core/ac-engineering/-/jobs/174743095#L30)84:18) at async Engine.ensurePackageManager (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23380:32) at async PrepareCommand.execute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:24147:27) at async PrepareCommand.validateAndExecute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21173:22) at async _Cli.run (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22148:18) at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:24266:12)

Worked fine with node image: node:iron@sha256:894c91653e564b9ba29400e6e1675bbcbc667158c1706c655dd4ccf84d0f54e8

@Chreggii Chreggii changed the title Corepack runs into an internal error with node version node:iron@sha256:04223c46b1b8998bccbb6e6208dbed8344916ffc1be9f446109ffcb9629ad791 Corepack runs into an internal error with newest iron node version Apr 2, 2024
@Chreggii
Copy link
Author

Chreggii commented Apr 8, 2024

It seems to be a proxy issue.

For reproducing the issue run the following code in a gitlab-ci pipeline (new node image):

stages:
  - build

build:
  stage: build
  image: node:iron@sha256:b73550fae550a1385e56500f4d95545f4808439828786e9bff9913e6a57989dc
  before_script:
    - corepack enable
    - HTTPS_PROXY=$CODE_PROXY corepack prepare pnpm@latest-8 --activate
    - pnpm config set store-dir .pnpm-store
  script:
    - HTTPS_PROXY=$CODE_PROXY pnpm install # install dependencies
  cache:
    key:
      files:
        - pnpm-lock.yaml
    paths:
      - .pnpm-store

With the previous node image everything worked fine:

stages:
  - build

build:
  stage: build
  image: node:iron@sha256:894c91653e564b9ba29400e6e1675bbcbc667158c1706c655dd4ccf84d0f54e8
  before_script:
    - corepack enable
    - HTTPS_PROXY=$CODE_PROXY corepack prepare pnpm@latest-8 --activate
    - pnpm config set store-dir .pnpm-store
  script:
    - HTTPS_PROXY=$CODE_PROXY pnpm install # install dependencies
  cache:
    key:
      files:
        - pnpm-lock.yaml
    paths:
      - .pnpm-store

@Chreggii Chreggii changed the title Corepack runs into an internal error with newest iron node version Corepack runs into an internal error with newest iron node image [Proxy issue] Apr 8, 2024
@nan-mu
Copy link

nan-mu commented Apr 8, 2024

Same question and I have gave up. Corepack should just fit with system proxy

I would like to suggest that corepack should not be the only way to set up a package management tool, which a lot of tools are doing now. Both Windows and Linux systems have their own package management tools and they have performed their jobs well for a long time. Corepack undoubtedly adds a lot of learning costs.

@ertl
Copy link

ertl commented Apr 10, 2024

Same Problem here. Any Workarounds?

@aduh95
Copy link
Contributor

aduh95 commented Apr 10, 2024

Hopefully this should be fixed by #451. In the mean time, downgrading to [email protected] might be a workaround.

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

No branches or pull requests

4 participants