为什么 Node 模块会进入 .staging 文件夹? [英] Why do Node modules go into .staging folder?
问题描述
我有一个 Electron 应用程序,我正在尝试为其安装节点模块.当我运行 npm install
时,它会创建 node_modules
文件夹,但所有模块都进入一个名为 .staging
的子文件夹.每个模块还附加了 -xxxxx
,其中 x 是一些随机的字母数字.
I have an Electron app that I'm trying to install node modules for. When I run npm install
, it creates the node_modules
folder but all the modules go into a subfolder called .staging
. Each module also has -xxxxx
appended to it, where the x's are some random alphanumerics.
我创建的其他 Electron 应用程序从未这样做过.所有节点模块都位于 node_modules
的根目录中,并且没有附加 -xxxxx
.
Other Electron apps I've created have never done this. All the node modules sit in the root of node_modules
and don't have -xxxxx
appended.
知道为什么会这样吗?
推荐答案
我也遇到了同样的问题,我尝试了以下步骤:
I was also facing the same issue, I tried the steps below:
- 删除 package-lock.json
- 删除节点模块文件夹
尝试使用以下命令安装它(应该在开放网络中)
- Delete package-lock.json
- Delete Node Modules folder
Try installing it using below command (should be in open network)
npm install
注意:-.staging"意味着,这些依赖项正在被下载,因此临时将所有这些依赖项保存在.staging"文件夹下.一旦全部正确下载,它将仅在 node_modules 下展示它们.
Note: - ".staging" means, those dependencies are getting downloaded so for the temporary basis it keeps all those dependencies under ".staging" folder. Once all gets downloaded properly then it will showcase them under node_modules only.
我希望这会奏效.
这篇关于为什么 Node 模块会进入 .staging 文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!