简体   繁体   English

将隐藏的文件夹从Windows 10复制到Mac OS X

[英]Copying hidden folders from Windows 10 to Mac OS X

I am moving my nodejs development from Windows 10 to Mac OS X 10.11.3. 我正在将nodejs开发从Windows 10迁移到Mac OS X 10.11.3。 I am only vaguely familiar with the operation of my Mac, which I hope to rectify over the coming weeks. 我只是对Mac的操作有些模糊,我希望在接下来的几周内进行纠正。

I copied the app folder from Windows to OS X, but it appears that the hidden folders, such as node_modules/.bin , are either hidden on my Mac or have not been copied at all. 我将app文件夹从Windows复制到OS X,但是似乎隐藏的文件夹(例如node_modules/.bin在Mac上是隐藏的,或者根本没有被复制。 I opened a Terminal window and ran ls | more 我打开终端窗口并运行ls | more ls | more but could not see the .bin folder. ls | more但看不到.bin文件夹。

Can someone familiar with this procedure illuminate my dark mind? 熟悉此程序的人可以照亮我的黑暗头脑吗?

The answer from @platinhom is right, though since you're moving from an OS to an other there are a lot of chances that the modules in your node_modules directory not only contains just js files, but also binaries (which have to be compiled specifically for your OS - meaning the ones from windows won't work on Mac OS). @platinhom的答案是正确的,尽管由于您是从操作系统转移到另一个操作系统,所以node_modules目录中的模块很可能不仅包含js文件,而且还包含二进制文件(必须专门编译)适用于您的操作系统-意味着Windows上的Windows不适用于Mac OS)。

Since you have a node_module/.bin folder this is very most likely. 由于您有一个node_module/.bin文件夹,因此很有可能。

What you should do is, at the root of your project (where there should be a package.json - and only if there is a package.json ): 您应该做的是,在项目的根目录下(应该有package.json- 且只有在有package.json的情况下 ):

rm -rf ./node_modules
npm install

This will reinstall the modules declared in the package.json from the npm registry. 这将从npm注册表中重新安装package.json声明的模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM