【问题标题】:EJS not installingEJS没有安装
【发布时间】:2021-10-31 23:48:52
【问题描述】:

我正在尝试在我的项目中安装 ejs,这是我第一次这样做。 我尝试了几个命令,但似乎都不起作用。

我尝试过的一些命令如下:

npm i ejs
npm i ejs --save
npm i ejs -g
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "ejs" under a package
npm ERR! also called "ejs". 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:

这是什么原因造成的,我该如何解决这个问题

【问题讨论】:

    标签: javascript node.js npm


    【解决方案1】:

    package.json 中,您可能将您的项目命名为“ejs”,在这种情况下会出现类似错误,请将您的项目重命名为其他名称,然后再次尝试安装 ejs。

    【讨论】:

      猜你喜欢
      • 2021-05-26
      • 1970-01-01
      • 1970-01-01
      • 2021-11-25
      • 2019-06-03
      • 2020-10-30
      • 2021-04-29
      • 2020-09-02
      • 2021-12-18
      相关资源
      最近更新 更多