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

bower_components symlink path issue #33

Open
vadimkuragkovskiy opened this issue Nov 7, 2018 · 1 comment
Open

bower_components symlink path issue #33

vadimkuragkovskiy opened this issue Nov 7, 2018 · 1 comment

Comments

@vadimkuragkovskiy
Copy link

vadimkuragkovskiy commented Nov 7, 2018

Hello,

I spotted an issue with the symlink path. If someone uses vagrant or docker or similar dev env the absolute path won't work in 100% cases.

For example I'm using docker and webdevops images. My application mounts in the docker with that path: /app/

The issue is that when I run yarn outside from docker console (my docker image doesn't have installed yarn and I don't want to add it here) it builds the symlink like this:

bower_components -> /Users/vadim/workspace/webdevops/app/node_modules/@bower_components

Historically we are building our js files using php script and grunt for css. (yep it's a shame. I hope sometime we will move to the webpack). Php application runs inside docker and seek into the ./bower_components dir which is a symlink. When php script tries to access the folder by the link above it receives the error because of the path /Users/vadim/workspace/webdevops/app/node_modules/@bower_components inside docker doesn't exist.

The correct absolute path for docker should be like /app/node_modules/@bower_components.
If I fix the path my grunt won't work because it runs outside from docker and can't find the absolute path /app/node_modules/@bower_components inside the main system

As a solution in my case could be a relative path:

bower_components -> ./node_modules/@bower_components/

I'm not sure if it is a good idea for all possible cases, but it looks more flexible. I'm also not an expert in nodejs to send a pull request with the proposal of robust fix.

@sheerun What is your thoughts?

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

2 participants
@vadimkuragkovskiy and others