This is the strangest issue and only happens on one iOS framework in particular (that i noticed) within an npm module.
when clicking on the framework (before npm publish) I see:
frameworkname.framework
|
- Headers (dir)
- frameworkname
- Versions (dir)
|
-A (dir)
-Current (dir)
I published this module to a private npm server. When I install the npm module the framework is corrupt. I see:
frameworkname.framework
|
- Headers (dir) MISSING
- frameworkname MISSING
- Versions (dir)
|
-A (dir)
-Current (dir) MISSING
After reading http://www.raywenderlich.com/65964/create-a-framework-for-ios it looks like the missing files are symlinks. Has anyone else seen this behavior before? How do I keep the symlinks from being lost during the npm process?
By default, npm publish updates and npm install installs the latest tag. See npm-dist-tag for details about tags. [--access <public|restricted>] Tells the registry whether this package should be published as public or restricted. Only applies to scoped packages, which default to restricted .
When you run npm publish , npm bundles up all the files in the current directory. It makes a few decisions for you about what to include and what to ignore. To make these decisions, it uses the contents of several files in your project directory. These files include .
So, whenever you run npm publish command, the following scripts will run sequentially: npm test then npm run lint then npm run build and finally npm publish .
The missing files are symbolic links, and unfortunately, npm doesn't support symbolic links. As a workaround, you can replace the links with their targets (and remove the targets to prevent duplication).
E.g. for a framework FFF with the structure:
./FFF -> Versions/Current/FFF
./Headers -> Versions/Current/Headers
./Versions
./Versions/A
./Versions/A/FFF
./Versions/A/Headers
./Versions/Current -> A
you can run the following (in bash) from inside the framework directory:
framework=FFF && rm $framework Headers && mv Versions/A/{$framework,Headers} . && rm -rf Versions
to change the structure to:
./FFF
./Headers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With