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

查看:210
本文介绍了为什么节点模块进入.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.

知道为什么会这样吗?

推荐答案

这仅在下载并安装模块之前临时发生. Node似乎是这样做的,因此它可以将要安装的所有模块中的公共子模块放在一起,以便更好地构造node modules文件夹(主要用于Windows用户).

This only happens temporarily until the modules are downloaded and installed. Node seems to do this so it can place together common submodules from all the modules you are installing so it can better structure the node modules folder(mainly for windows users).

如果这是在npm安装完成之后发生的,则可能是您的节点安装有问题或安装失败.

If this is happening after an npm install finishes it is likely that there is something wrong with your node installation or something in the install failed.

这篇关于为什么节点模块进入.staging文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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