node js 크롤링
node js 개별 모듈 업데이트하기
개발자하나
2023. 5. 11. 00:49
구버전이 깔려있던 node 을 업데이트하기 위해 홈페이지에서 latest 버전을 다운 받아서 설치했다.
https://nodejs.org/ko/download
이후 npm install express하고 설정하다가 node_modules, package 관련 파일을 뺀 나머지 폴더 자체를 삭제하고 다른 모듈을 설정하려는데 critical 에러가 난다.
12 packages are looking for funding
run `npm fund` for details
5 vulnerabilities (1 low, 1 high, 3 critical)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
이 글을 참고해서
package-lock.json을 삭제,
node_modules 폴더 삭제,
다시 npm install을 실행한다(npm i로 줄여도 된다)
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated jade@0.31.2: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.0.1: Deprecated, use jstransformer
added 107 packages, and audited 108 packages in 22s
7 packages are looking for funding
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
deprecated된 모듈이 있어서
npm update XXX (모듈명)으로 업데이트를 진행했다.
이후에도 아직 경고가 떠서 npm audit fix --force를 실행했다.
취약점이 사라졌다.