Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples_postinstall removes wrong files #94

Open
Phecda opened this issue Jan 15, 2019 · 0 comments
Open

examples_postinstall removes wrong files #94

Phecda opened this issue Jan 15, 2019 · 0 comments

Comments

@Phecda
Copy link

Phecda commented Jan 15, 2019

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant