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

Unable to build on Linux/Mac when app contains symlink #394

Closed
rosen-vladimirov opened this issue Mar 30, 2015 · 1 comment · Fixed by #395
Closed

Unable to build on Linux/Mac when app contains symlink #394

rosen-vladimirov opened this issue Mar 30, 2015 · 1 comment · Fixed by #395
Assignees
Labels
Milestone

Comments

@rosen-vladimirov
Copy link
Contributor

In case you have symlink in your app, you can build it only the first time. Each consecutive try leads to

shell.js: internal error
Error: EEXIST, file already exists 'main-page.xml'
    at Object.fs.symlinkSync (fs.js:742:18)
    at cpdirSyncRecursive (/home/rvladimirov/Work/nativescript-cli/node_modules/shelljs/src/cp.js:76:10)
    at cpdirSyncRecursive (/home/rvladimirov/Work/nativescript-cli/node_modules/shelljs/src/cp.js:73:7)
    at /home/rvladimirov/Work/nativescript-cli/node_modules/shelljs/src/cp.js:180:9
    at Array.forEach (native)
    at Object._cp (/home/rvladimirov/Work/nativescript-cli/node_modules/shelljs/src/cp.js:157:11)
    at Object.cp (/home/rvladimirov/Work/nativescript-cli/node_modules/shelljs/src/common.js:186:23)
    at /home/rvladimirov/Work/nativescript-cli/lib/services/platform-service.js:128:19
    at Function.settle (/home/rvladimirov/Work/nativescript-cli/node_modules/fibers/future.js:220:26)
    at FiberFuture.Future.wait (/home/rvladimirov/Work/nativescript-cli/node_modules/fibers/future.js:487:10)

Steps to reproduce:

  • Create project: tns create app1
  • cd app1
  • tns platform add android
  • cd app/app/
  • ln -s main-page.xml symlinkToMainPage.xml
  • tns build android // this one will pass
  • tns build android // this one will fail

This is very important when you are using node_modules in your app, as node_modules dir contains .bin directory with symlinks to actual files.

The issue is not reproducible on Windows.

@rosen-vladimirov rosen-vladimirov self-assigned this Mar 30, 2015
@rosen-vladimirov rosen-vladimirov added this to the 0.10 milestone Mar 30, 2015
rosen-vladimirov added a commit that referenced this issue Mar 30, 2015
Delete dir where app will be copied on prepare. If we do not delete it, on Linux and Mac we receive EEXIST errors for symlinks inside app directory. Symlinks are common scenario when node_modules are used.

Fixes #394
@teobugslayer teobugslayer modified the milestones: 1.0, 0.10 Apr 24, 2015
@ghost
Copy link

ghost commented Dec 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants