{"action":"opened","issue":{"url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/722","repository_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin","labels_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/722/labels{/name}","comments_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/722/comments","events_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/722/events","html_url":"https://github.com/eirslett/frontend-maven-plugin/issues/722","id":323708751,"number":722,"title":"The downloaded node/npm script uses global nodejs in Linux ","user":{"login":"sliu2013","id":9542228,"avatar_url":"https://avatars0.githubusercontent.com/u/9542228?v=4","gravatar_id":"","url":"https://api.github.com/users/sliu2013","html_url":"https://github.com/sliu2013","followers_url":"https://api.github.com/users/sliu2013/followers","following_url":"https://api.github.com/users/sliu2013/following{/other_user}","gists_url":"https://api.github.com/users/sliu2013/gists{/gist_id}","starred_url":"https://api.github.com/users/sliu2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sliu2013/subscriptions","organizations_url":"https://api.github.com/users/sliu2013/orgs","repos_url":"https://api.github.com/users/sliu2013/repos","events_url":"https://api.github.com/users/sliu2013/events{/privacy}","received_events_url":"https://api.github.com/users/sliu2013/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-16T17:05:26Z","updated_at":"2018-05-16T17:05:26Z","closed_at":null,"author_association":"NONE","body":"<!-- Before creating an issue please \r\n - search for existing duplicate or closed issues \r\n - make sure you are using the latest version of frontend-maven-plugin \r\n-->\r\n\r\n**Do you want to request a _feature_ or report a _bug_?**\r\nmaybe it's a bug, but I'm not 100% sure\r\n\r\n**What is the current behavior?**\r\n\r\n1. Apply this frontend-maven-plugin for my project in a Ubuntu machine. \r\n2. If I use the exec-maven-plugin to do \"./node/npm install\" against the downloaded npm (which is downloaded through frontend-maven-plugin), according to the line#11 in the npm script, it will use the global nodejs instead the downloaded nodejs since I'm running this in a Linux machine. I attach the npm script in below.\r\n```\r\n#!/bin/sh\r\n(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix\r\n\r\nbasedir=`dirname \"$0\"`\r\n\r\ncase `uname` in\r\n    *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\r\nesac\r\n\r\nNODE_EXE=\"$basedir/node.exe\"\r\nif ! [ -x \"$NODE_EXE\" ]; then\r\n  NODE_EXE=node\r\nfi\r\n\r\nNPM_CLI_JS=\"$basedir/node_modules/npm/bin/npm-cli.js\"\r\n\r\ncase `uname` in\r\n  *MSYS*)\r\n    ;&\r\n  *MINGW*)\r\n    NPM_PREFIX=`\"$NODE_EXE\" \"$NPM_CLI_JS\" prefix -g`\r\n    NPM_PREFIX_NPM_CLI_JS=\"$NPM_PREFIX/node_modules/npm/bin/npm-cli.js\"\r\n    if [ -f \"$NPM_PREFIX_NPM_CLI_JS\" ]; then\r\n      NPM_CLI_JS=\"$NPM_PREFIX_NPM_CLI_JS\"\r\n    fi\r\n    ;;\r\n  *CYGWIN*)\r\n    NPM_PREFIX=`\"$NODE_EXE\" \"$NPM_CLI_JS\" prefix -g`\r\n    NPM_PREFIX_NPM_CLI_JS=\"$NPM_PREFIX/node_modules/npm/bin/npm-cli.js\"\r\n    if [ -f \"$NPM_PREFIX_NPM_CLI_JS\" ]; then\r\n      NPM_CLI_JS=\"$NPM_PREFIX_NPM_CLI_JS\"\r\n    fi\r\n    ;;\r\nesac\r\n\r\n\"$NODE_EXE\" \"$NPM_CLI_JS\" \"$@\"\r\n```\r\n\r\n**What is the expected behavior?**\r\nSince the npm script is authored by the npm community, this may not be an issue to the frontend-maven-plugin. But I'm just wondering if anyone encounters this issue and how people overcome this problem. Maybe re-set PATH variable to use the newly downloaded \"nodejs\" instead of the global nodejs?!\r\n\r\n**Please mention your frontend-maven-plugin and operating system version.**\r\n* frontend-maven-plugin version: 1.0\r\n* OS: ubuntu 16.04.4"}}
{"actor":{"display_login":"sliu2013"}}