简体   繁体   中英

*.js.icloud where does that come from in “node_modules” folder or for other files of my project on macOS

I use NPM through an IONIC3.0.1 project.

ionic info gives:

  • Cordova CLI: 6.5.0
  • Ionic Framework Version: 3.0.1
  • Ionic CLI Version: 2.2.3
  • Ionic App Lib Version: 2.2.1
  • Ionic App Scripts Version: 1.3.12
  • ios-deploy version: 1.9.1
  • ios-sim version: 5.0.13
  • OS: macOS
  • Node Version: v6.9.1 Xcode version 9.2

npm -v gives: 5.7.1

Sometimes I got in trouble with NPM and the version of the various packages set in the [project]/package.json file. I work around it with some npm install and altering the value of the dependencies to the right ones like in that thread .

But something new is happening, and has the consequence of throwing errors when building the project.

Some of the files seem to disapear or be renamed. When building ionic build android I get the following error: Error: Cannot find module './optimize/MergeDuplicateChuncksPlugin

After a bit of investigation I figure that in [project]/node_modules there is a should be the file webpack/lib/optimize/MergeDuplicateChunksPlugin.js

But instead in [project]/node_moduleswebpack/lib/optimize/ , the file MergeDuplicateChunksPlugin.js doesn't exist and it seems to have been substitued by a file .MergeDuplicateChunksPlugin.js.icloud .

I don't get it. Is it Apple icloud doing some action on my project?

NOTE ALSO that webpack is not suppose to be in the list of my dependencies in the file [project]/package.json .

I've tried to do a remove rm -rf node_modules/webpack and reinstall npm install webpack .

Remove delete the files but not the structure folder. And the reinstall command npm install webpack bugs because there is a file project/node_modules/.bin/webpack that should be moved away according to the log also it is not possible to do so.

My question is: why do I have *.js.icloud files appearing in my project?

The issue is that icloud process or has processed some operations on some files.

In the Finder app go to the folder of the file which appears as missing.

find the .[file name + its extension].icloud file, right click to download the correct file. [file name + its extension] will become available instead of .[file name + its extension].icloud .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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