Userfrosting did not detect nodejs? 【SOLVED】



OS: centos 7.6 64
CentOS Linux release 7.6.1810 (Core)

Build lnmp (Linux + Nginx+ MySQL+ PHP) with OneinStack

I refer to
Nodejs installed
Nodejs integrates with NPM
Why am I stopping at the steps above? ?

the exec function is indeed disabled, resulting in no version information for Nodejs being detected.

Link you refer to looks to be incorrect (probably a missing hash symbol), so for reference here is the actual link.

Have you verified that node is accessible from PATH? Running node -v successfully would verify.

As for why it stops, it can’t find node and as such aborts the command.

Look at the top command run record in the screenshot, which should indicate that Node and NPM have been installed correctly.
Also, do you need to specifically add Node and NPM to global variables?

I think so too, it should not be a question of permissions.

Ah, right. I completely missed that. I can’t think of any other reason for it to be failing. Only other thing I can think to try is restart, if you haven’t tried that already.

What is the purpose of restarting the system?


Are there contradictions between these two sentences? ?

Also, I believe the command on CentOS is nodejs instead of node. Not sure whether the setup code checks this.

They should be a thing, so what should I do?

I double-checked my previous statement and I believe it may be incorrect and only applies to Debian. Maybe check the installer to see how it checks for node/nodejs?

This is the node check code which throws the error you see:

And this is where the minimal node version value is assigned. Please note the “v” prefix which might be the cause of the error with your specific PHP version:

See what happens when you remove the “v” and then run bakery bake again. If that fixes it we’ll need to report it or else submit a pull-request.

EDIT: please understand you are running close to bleeding edge versions of PHP and node so you may run into other small issues…

I have seen these before. I know it is because of node, but I don’t know why UserFrosting can’t detect the Node and NPM I installed.

I will try again later.

I have the same prompts as Nodejs already installed without Nodejs installed. The prompt is the same as the userfrosting result shown in the screenshot above.

Then I suggest you install PHP 7.2 and Node.js 10.x and try again. If that doesn’t work I’m out ideas.

Is there any other direction to try?

I did not install apache.
I use nginx