[
https://issues.apache.org/jira/browse/CB-9273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629497#comment-14629497
]
Sergey Shakhnazarov edited comment on CB-9273 at 7/16/15 9:47 AM:
------------------------------------------------------------------
Ok, thank you!
Tested with *n* - *find* code works well.
Although we may suppress error messages to avoid errors in XCode (in case there
are no *nvm* or *n* installed):
{code}
shellScript = "NODEJS_PATH=/usr/local/bin; NVM_NODE_PATH=~/.nvm/`nvm version
2>/dev/null`/bin; N_NODE_PATH=`find /usr/local/n/versions/node/* -maxdepth 0
-type d 2>/dev/null | tail -1`/bin; XCODE_NODE_PATH=`xcode-select
--print-path`/usr/share/xcs/Node/bin;
PATH=$NODEJS_PATH:$NVM_PATH:$N_PATH:$XCODE_NODE_PATH:$PATH && node
cordova/lib/copy-www-build-step.js";
{code}
PS:
{code}
n bin $(n --latest)
{code}
This snippet will not work as *n --latest* returns available and not installed
versions.
was (Author: daserge):
Ok, thank you!
Tested with *n* - *find* code works well.
Although we may suppress error messages to avoid errors in XCode (in case there
are no *nvm* or *n* installed):
{code}
shellScript = "NODEJS_PATH=/usr/local/bin; NVM_NODE_PATH=~/.nvm/'nvm version
2>/dev/null'/bin; N_NODE_PATH='find /usr/local/n/versions/node/* -maxdepth 0
-type d 2>/dev/null | tail -1'/bin; XCODE_NODE_PATH='xcode-select
--print-path'/usr/share/xcs/Node/bin;
PATH=$NODEJS_PATH:$NVM_PATH:$N_PATH:$XCODE_NODE_PATH:$PATH && node
cordova/lib/copy-www-build-step.js";
{code}
PS:
{code}
n bin $(n --latest)
{code}
This snippet will not work as *n --latest* returns available and not installed
versions.
> "Copy www build phase" node is not found
> ----------------------------------------
>
> Key: CB-9273
> URL: https://issues.apache.org/jira/browse/CB-9273
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Environment: cordova-ios 4.x
> Reporter: Shazron Abdullah
> Attachments: xcode-build-phase-node.png
>
>
> I have node installed using nvm, and the build phase cannot find node.
> The path to node in nvm is in $PATH in Terminal. It may not be in Xcode's
> environment variables.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]