Dev./Node.js
[Node.js] ERR! code ENOSELF
인쥭
2021. 7. 29. 13:50
반응형
- npm install시 다음과 같은 에러가 발생할 수 있다.
[fxjs] npm install fxjs
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "fxjs" under a package
npm ERR! also called "fxjs". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ingnoh/.npm/_logs/2021-07-29T04_47_25_091Z-debug.log
[fxjs]
- 안내에서도 확인할 수 있듯, 프로젝트 이름과 설치하려는 패키지 이름이 같으면 문제가 발생한다.
- 폴더 이름도 바꿔주고, package.json의 name도 바꿔주도록 하자.
[sample_fxjs] npm install fxjs
> core-js-pure@3.15.2 postinstall /Users/ingnoh/WebstormProjects/sample_fxjs/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN sample_fxjs@1.0.0 No description
npm WARN sample_fxjs@1.0.0 No repository field.
+ fxjs@0.21.3
added 4 packages from 5 contributors and audited 4 packages in 0.966s
1 package is looking for funding
run `npm fund` for details
found 0 vulnerabilities
[sample_fxjs]
- 잘 된다.