dokku-bower-grunt-build-plugin icon indicating copy to clipboard operation
dokku-bower-grunt-build-plugin copied to clipboard

Error finding npm path

Open sibelius opened this issue 9 years ago • 1 comments

Using your command:

find / -name npm | tail -1 | xargs -I % sh -c "dirname %"

you find the path: /app/.heroku/node/lib/node_modules/npm/bin/, instead of /app/.heroku/node/bin/

you should change to:

find / -name npm | head -1 | xargs -I % sh -c "dirname %"

sibelius avatar Mar 18 '15 15:03 sibelius

I had the same result with "find .... tail" but me (and perhaps you) are testing the "find ..." command on a container after "git push" process.

I changed it to "find ... head" and tried echoing the $new_path variable but it is empty.

It seems to me that at the stage of the build where this code is executed the "/app/.heroku/node...." folder has not been created and this causes the error finding the npm path.

I believe I have validated this and swapping out the "find ..." for the "/app/...." and then everything works as expected.

Hope this makes sense.

arnthorsnaer avatar Apr 03 '15 17:04 arnthorsnaer