-
Last week I switched to a new laptop. The OS is MacOS (M1). When I try to create a PDF it gives the following error: sh: npm: command not found sh: node: command not found This is for the following command:
The error is pretty clear. It can't find the two commands. This feels like a I've added PHP is not restricted and should be able to access that path. When I run a basic selfmade script, it does work: <?php
$output = null;
exec('node --version', $output);
print_r($output); So, eh, help? :) edit: it does work when I use |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
I just created a PR that fixes this issue: #581 |
Beta Was this translation helpful? Give feedback.
-
Just adding my two cents to this topic. As I'm using node version manager the default paths still won't do the trick for my setup. As far as I can tell the only way to do this is using I suppose the best option you have if you run a similar setup as me is using
Your path can be found by running Still open for other suggestions, but I guess node version manager just is one of those things you really can't take into account in this package as the paths are different for everybody. |
Beta Was this translation helpful? Give feedback.
-
This was fixed with setIncludePath, but other developers/servers will have different paths and setups. Any suggestions other than reverting to nodesource installer? |
Beta Was this translation helpful? Give feedback.
-
To to make this nicer.... I've gone with this in AppServiceProvider
Then you set the NODE_PATH env var if you need it; if not set - gets ignored. |
Beta Was this translation helpful? Give feedback.
I just created a PR that fixes this issue: #581