gpt4 book ai didi

node.js - NPM 在错误的地方安装依赖项

转载 作者:搜寻专家 更新时间:2023-10-31 23:32:49 24 4
gpt4 key购买 nike

我只是在一个文件夹中运行一个简单的 npm install morgan 并且出于某种原因它将所有子依赖项添加到父文件夹。见附图

enter image description here

最佳答案

是的,这是 npm 3.x 中的新功能,您可以在这里阅读:

https://github.com/npm/npm/releases/tag/v3.0.0

Your dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies, and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies.

基本上,它现在以尽可能少的嵌套处理依赖关系。

关于node.js - NPM 在错误的地方安装依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32727336/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com