[Troubleshooting] gitlab-runner가 연결하려 할 때 403 error
[Troubleshooting] gitlab-runner가 연결하려 할 때 403 error
🚫 현상
docker container 상에서
npm install
을 했을 때 의존성 충돌 문제 발생1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
> [frontend 4/5] RUN npm install: 11.95 npm error code ERESOLVE 11.95 npm error ERESOLVE unable to resolve dependency tree 11.95 npm error 11.95 npm error While resolving: ssafy-vue@0.1.0 11.95 npm error Found: webpack@4.47.0 11.95 npm error node_modules/webpack 11.95 npm error dev webpack@"^4.46.0" from the root project 11.95 npm error 11.95 npm error Could not resolve dependency: 11.95 npm error peer webpack@"5.x.x" from webpack-cli@5.1.4 11.95 npm error node_modules/webpack-cli 11.95 npm error dev webpack-cli@"^5.1.4" from the root project 11.95 npm error 11.95 npm error Fix the upstream dependency conflict, or retry 11.95 npm error this command with --force or --legacy-peer-deps 11.95 npm error to accept an incorrect (and potentially broken) dependency resolution. 11.95 npm error 11.95 npm error 11.95 npm error For a full report see: 11.95 npm error /root/.npm/_logs/2025-02-04T16_58_55_692Z-eresolve-report.txt 11.96 npm notice 11.96 npm notice New major version of npm available! 10.8.2 -> 11.1.0 11.96 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.1.0 11.96 npm notice To update run: npm install -g npm@11.1.0 11.96 npm notice 11.96 npm error A complete log of this run can be found in: /root/.npm/_logs/2025-02-04T16_58_55_692Z-debug-0.log ------ failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1
💡원인
webpack@4.47.0
과webpack-cli@5.1.4
간의 의존성 충돌 문제이다.webpack-cli@5.x.x
는webpack@5.x.x
를 필요로 하지만, 현재 프로젝트에서는webpack@4.47.0
이 사용되고 있기 때문.
🛠 해결책
🤔 회고
📚 Reference
This post is licensed under CC BY 4.0 by the author.