• 카테고리

    질문 & 답변
  • 세부 분야

    데브옵스 · 인프라

  • 해결 여부

    해결됨

(Node.js, VSCode) 컨테이너 내부에서 개발환경 구성 중 node 설치 실패

24.05.01 03:35 작성 조회수 53

1

(Node.js, VSCode) 컨테이너 내부에서 개발환경 구성

파트에서 Dev Container 로 설치 중(10:50)

설치가 아래와 같이 실패했다고 뜹니다.

> yorkie@2.0.0 install /workspaces/leafy/leafy-frontend/node_modules/yorkie
> node bin/install.js

setting up Git hooks
can't find .git directory, skipping Git hooks installation
[            ......] - postinstall:@jridgewell/trace-mapping: info lifecycle @jridg[            ......] - postinstall:@vue/cli-overlay: info lifecycle @vue/cli-overla[            ......] - postinstall:astral-regex: info lifecycle astral-regex@2.0.0~

> core-js@3.29.1 postinstall /workspaces/leafy/leafy-frontend/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScrip
t standard library!

The project needs your help! Please consider supporting of core-js:
> https://opencollective.com/core-js 
> https://patreon.com/zloirock 
> https://boosty.to/zloirock 
> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz 

I highly recommend reading this: https://github.com/zloirock/core-js/blob/master/docs/2023-02
-14-so-whats-next.md 

[            ......] \ postinstall:easy-stack: info lifecycle easy-stack@1.0.1~post[            ......] \ postinstall:fresh: info lifecycle fresh@0.5.2~postinstall: f[            ......] / postinstall:ansi-regex: info lifecycle ansi-regex@3.0.1~post[            ......] \ postinstall:retry: info lifecycle retry@0.13.1~postinstall: [            ......] \ postinstall:chokidar: info lifecycle chokidar@3.5.3~postinst[            ......] / postinstall:@babel/helper-compilation-targets: info lifecycl[            ......] | postinstall: info lifecycle vuex@4.1.0~postinstall: vuex@4.1[            ......] - postinstall: info lifecycle vuex@4.1.0~postinstall: vuex@4.1[             .....] / prepare:leafy-frontend: info lifecycle leafy-front@0.1.0~prenpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted
 {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 967 packages from 521 contributors and audited 968 packages in 162.033s

104 packages are looking for funding
  run `npm fund` for details

found 36 vulnerabilities (29 moderate, 1 high, 6 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Done. Press any key to close the terminal.

다행이 npm은 정상적으로 설치되어 있으나

$ npm --version
6.14.18

node 설치가 문제가 생긴 것 같습니다.

$ node version 
internal/modules/cjs/loader.js:934
  throw err;
  ^

Error: Cannot find module '/workspaces/leafy/leafy-frontend/version'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)
    at Function.Module._load (internal/modules/cjs/loader.js:774:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

근데 serve는 실행이 됩니다. (다만 :80으로)

$ npm run serve

> leafy-front@0.1.0 serve /workspaces/leafy/leafy-frontend
> vue-cli-service serve --port 80

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
 INFO  Starting development server...


 DONE  Compiled successfully in 65898ms                                                 6:25:25 PM


  App running at:
  - Local:   http://localhost:80/ 

  It seems you are running Vue CLI inside a container.
  Access the dev server via http://localhost:<your container's external mapped port>/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

답변 1

답변을 작성해보세요.

0

baileypark 님 안녕하세요. 데브위키입니다.

 

node version 

명령 시 발생한 에러는 명령어 에러로 보여집니다!

 

node --version 

명령으로 확인해보시면 정상적으로 결과를 확인하실 수 있으실 것 같습니다. 😀

 

강의 들으시면서 더 궁금하신 부분이 있으면 편하게 질문주세요!