Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PowerBI CLI node: No such file or directory

I am trying to build PHP wrapper for PowerBI. I installed PowerBI Cli (https://github.com/Microsoft/PowerBI-Cli) on my local and when I run any PowerBI Cli command on my terminal, it is working well. It is working well even when I run the commands using the _www user (sudo -u _www powerbi config)

However, when I run them through PHP using either shell_exec or Symphony's Process Component (https://symfony.com/doc/current/components/process.html), I am getting the following exception:

env: node: No such file or directory.

I am facing this issue on Mac Sierra. The commands are working well on Linux using the PHP exec()

like image 654
Tosho Trajanov Avatar asked Dec 30 '16 15:12

Tosho Trajanov


1 Answers

Try linking,

"ln -s /path/where/command/is stored/ /to/path/where u want to exec/"

Sometimes the program are stored in usr/local/bin/program meanwhile as per default you are executing in usr/bin/program

And then in shell use the new path you have set.

Example for linking suppose if you have path for command,

/usr/bin/powerbi then with above command you can link new path usr/powerbi after that you can use new path in exec or shell command.

like image 104
Abhishek Gurjar Avatar answered Nov 15 '22 00:11

Abhishek Gurjar