为什么 Node 模块会进入 .staging 文件夹? [英] Why do Node modules go into .staging folder?

查看:9
本文介绍了为什么 Node 模块会进入 .staging 文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 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:

  1. 删除 package-lock.json
  2. 删除节点模块文件夹
  3. 尝试使用以下命令安装它(应该在开放网络中)

  1. Delete package-lock.json
  2. Delete Node Modules folder
  3. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆