{"action":"created","issue":{"url":"https://api.github.com/repos/asdf-vm/asdf/issues/162","repository_url":"https://api.github.com/repos/asdf-vm/asdf","labels_url":"https://api.github.com/repos/asdf-vm/asdf/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/asdf-vm/asdf/issues/162/comments","events_url":"https://api.github.com/repos/asdf-vm/asdf/issues/162/events","html_url":"https://github.com/asdf-vm/asdf/issues/162","id":207687110,"node_id":"MDU6SXNzdWUyMDc2ODcxMTA=","number":162,"title":"npm seems to be tripping on asdf","user":{"login":"Jwashton","id":3431482,"node_id":"MDQ6VXNlcjM0MzE0ODI=","avatar_url":"https://avatars1.githubusercontent.com/u/3431482?v=4","gravatar_id":"","url":"https://api.github.com/users/Jwashton","html_url":"https://github.com/Jwashton","followers_url":"https://api.github.com/users/Jwashton/followers","following_url":"https://api.github.com/users/Jwashton/following{/other_user}","gists_url":"https://api.github.com/users/Jwashton/gists{/gist_id}","starred_url":"https://api.github.com/users/Jwashton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jwashton/subscriptions","organizations_url":"https://api.github.com/users/Jwashton/orgs","repos_url":"https://api.github.com/users/Jwashton/repos","events_url":"https://api.github.com/users/Jwashton/events{/privacy}","received_events_url":"https://api.github.com/users/Jwashton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2017-02-15T01:42:58Z","updated_at":"2018-08-22T15:58:42Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Any invocation of `npm` on my system seems to be throwing this warning:\r\n\r\n```\r\nnpm WARN lifecycle The node binary used for scripts is /home/jwashton/.asdf/shims/node but npm is using /home/jwashton/.asdf/installs/nodejs/7.5.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.\r\n```\r\nA quick Google search brought me to [this issue](https://github.com/npm/npm/issues/14372) for npm. The most helpful bit being the [last](https://github.com/npm/npm/issues/14372#issuecomment-274318330) comment in the thread where @addaleax elaborated on the `--scripts-prepend-node-path` option.\r\n\r\nMy current best guess is that on [this line](https://github.com/npm/npm/blob/eff46dd498ed007bfa77ab7782040a3a828b852d/lib/utils/lifecycle.js#L156) `process.execPath` returns the bin path, and not the shim path. It then compares the that to the shim path in `$PATH` and raises alarms.\r\n\r\nThis doesn't seem to be causing issues, because npm is adding the bin we want it to use anyways, but I still don't like the warning. If the root cause is fixable (on either side) then I would be a happy man. Failing that, can we at least acknowledge the `--scripts-prepend-node-path` flag here? Either setting it automatically in `asdf-node` or leaving a message about it in the docs?\r\n\r\nP.S. I apologize if this issue should have been submitted on `asdf-node`, but I wasn't sure what implications this might have for the way asdf shims things in general."},"comment":{"url":"https://api.github.com/repos/asdf-vm/asdf/issues/comments/415084476","html_url":"https://github.com/asdf-vm/asdf/issues/162#issuecomment-415084476","issue_url":"https://api.github.com/repos/asdf-vm/asdf/issues/162","id":415084476,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTA4NDQ3Ng==","user":{"login":"SidOfc","id":3225058,"node_id":"MDQ6VXNlcjMyMjUwNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3225058?v=4","gravatar_id":"","url":"https://api.github.com/users/SidOfc","html_url":"https://github.com/SidOfc","followers_url":"https://api.github.com/users/SidOfc/followers","following_url":"https://api.github.com/users/SidOfc/following{/other_user}","gists_url":"https://api.github.com/users/SidOfc/gists{/gist_id}","starred_url":"https://api.github.com/users/SidOfc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SidOfc/subscriptions","organizations_url":"https://api.github.com/users/SidOfc/orgs","repos_url":"https://api.github.com/users/SidOfc/repos","events_url":"https://api.github.com/users/SidOfc/events{/privacy}","received_events_url":"https://api.github.com/users/SidOfc/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T15:58:42Z","updated_at":"2018-08-22T15:58:42Z","author_association":"NONE","body":"@joemsak well, this time you are not in the correct location.\r\nYou know that you need to `cd` into your node install, then run the exact command right? Follow my instructions **exactly**:\r\n\r\n```\r\ncd ~/.asdf/installs/nodejs/[VERSION]/lib && npm i npm\r\n```\r\n\r\nOnce again, **replace** `[VERSION]` with the proper version number and **skip** the `-g` switch on `npm i npm`. At the moment you are in `~` which is just your home directory.\r\n\r\nNote that I am not sure if this actually works, I've done it on macOS 10.12 (Sierra) and it _did work for me_ so I am kinda assuming it works when executed properly. Since you haven't actually tried it the correct way I can not assure you that it does actually work.\r\n\r\nGood luck and keep the reports up, they provide us with details that you missed from the examples. It helps debugging what went wrong :)"}}
{"actor":{"display_login":"SidOfc"}}