【发布时间】:2022-01-26 12:35:36
【问题描述】:
PS D:\PracticeRDX> npm install redux
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "redux" under a package
npm ERR! also called "redux". 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! C:\Users\ti\AppData\Roaming\npm-cache\_logs\2021-12-27T15_10_10_560Z-debug.log
PS D:\PracticeRDX>
【问题讨论】:
-
检查您的
package.json文件。选择一个不会与您的任何依赖项一起崩溃的名称。 -
你的项目目录或项目名与包名相同
-
我也认为这只是 npm 6 或更低版本的限制。如果你升级到最新的 npm,你可以调用你的项目
redux如果你愿意。