Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
npm ci en Dockerfile arroja 401 no autorizado cuando se usa el nodo: 16 como imagen base

Por algún motivo, NPM requiere autenticación cuando se ejecuta npm ci en una compilación docker. Nunca tuve este problema antes. ¿Lo que está sucediendo?

Este es mi Dockerfile:

 FROM node:16 as builder WORKDIR /app COPY package*.json ./ RUN npm ci

Este es el error que estoy recibiendo:

 > [4/4] RUN npm ci: #8 1.357 npm notice #8 1.357 npm notice New minor version of npm available! 7.21.1 -> 7.23.0 #8 1.357 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.23.0> #8 1.357 npm notice Run `npm install -g npm@7.23.0` to update! #8 1.357 npm notice #8 1.358 npm ERR! code E401 #8 1.359 npm ERR! Unable to authenticate, your authentication token seems to be invalid. #8 1.359 npm ERR! To correct this please trying logging in again with: #8 1.359 npm ERR! npm login #8 1.370 #8 1.370 npm ERR! A complete log of this run can be found in: #8 1.370 npm ERR! /root/.npm/_logs/2021-09-11T11_55_11_040Z-debug.log

Este es mi paquete.json:

 { "name": "warranty-ui", "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "serve": "vite preview" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^1.0.0-next.11", "sass": "^1.39.2", "svelte": "^3.37.0", "vite": "^2.5.4" }, "dependencies": { "bulma": "^0.9.3", "i18next": "^20.6.1", "msal": "^1.4.12" } }

Editar: descubrí que al usar node:14 como imagen base. El error no viene.

 FROM node:14 as builder

Esto funciona para mí, pero probablemente no para todos.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!