react-native-create-library
react-native-create-library copied to clipboard
examples_postinstall removes wrong files
Circumstance
- node 10.5.0
- npm 6.1.0
- macOS High Sierra (10.13.5)
Description
In example/node_modules/
my library is actually a symbolic link instead of a real copied directory, therefore the script examples_postinstall
(#75 ) removes example
itself and my library's node_modules
.
Workaround
Adding below codes works for me, but not sure for other situation.
if (fs.lstatSync(libraryNodeModulesPath).isSymbolicLink()) {
console.log('Symbolic link detected. End deleting');
return;
}