【问题标题】:npm ERR code ENOSELF when installing angular-notification-icons安装 angular-notification-icons 时的 npm ERR 代码 ENOSELF
【发布时间】:2019-12-07 04:27:12
【问题描述】:

我正在尝试使用此链接作为构建通知系统的参考:

https://github.com/jacob-meacham/angular-notification-icons

第一步是运行:

 npm install angular-notification-icons --save

我不确定运行它需要什么路径?我尝试在我的项目路径中运行它,但出现此错误:

npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "angular-notification-icons" under a package
npm ERR! also called "angular-notification-icons". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!

【问题讨论】:

  • 你的项目名称是什么。
  • 你应该在你的项目根路径中运行它

标签: angularjs npm


【解决方案1】:

package.json中项目名称与npm模块名称相似的问题。

若要解决,请将package.json中的项目名称更改为其他。

示例“角度通知图标测试”

{
  "name": "angular-notification-icons-test",
  "version": "0.0.0",
  "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
  },
  ...
}

【讨论】:

    猜你喜欢
    • 2022-12-14
    • 1970-01-01
    • 2018-10-29
    • 1970-01-01
    • 1970-01-01
    • 2023-03-02
    • 2019-05-10
    • 2021-11-28
    • 1970-01-01
    相关资源
    最近更新 更多