Userfrosting did not detect nodejs? 【SOLVED】


#1

QQ%E6%88%AA%E5%9B%BE20190506095939

OS: centos 7.6 64
CentOS Linux release 7.6.1810 (Core)
3.10.0-957.12.1.el7.x86_64
64

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

I refer to https://learn.userfrosting.com/installation/other-situations/centos#node-js
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.


#2

Link you refer to looks to be incorrect (probably a missing hash symbol), so for reference here is the actual link. https://learn.userfrosting.com/installation/other-situations/centos

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


#3

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


#4

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?


#5

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


#6

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.


#7

What is the purpose of restarting the system?


#8

@SiliconSoldier

https://learn.userfrosting.com/installation/other-situations/centos#node-js

Are there contradictions between these two sentences? ?


#9

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


#10

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


#11

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?


#12

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


#13

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:


#14

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…


#15

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.


#16

I will try again later.


#17

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.


#18

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.


#19

Is there any other direction to try?


#20

I did not install apache.
I use nginx