ReactPress手动模式:Wordpress需要访问npm



我正试图使用wordpress和reactpress在101domains.com上托管一个预先存在的react网站,但我目前被困在手动模式下进行reactpress。我已经将我的构建文件夹上传到wordpress,但我无法启动服务器来托管react应用程序。错误如下:

Currently you are in Manual Mode, (this means, you can create React apps only in your command line) because:
Your WordPress installation needs access to "npm 6" or higher to create React apps from the admin interface. However you can go to the app directory and use create-react-app from there.

我正试图弄清楚如何让WordPress访问npm,但我是WP的新手,所以我很失落。任何建议都很好!

将ReactPress与现有的create-rect应用程序一起使用。您需要在本地WordPress系统上使用ReactPress进行构建。我推荐localWP。

在那里安装ReactPress,将您的整个创建react应用程序复制到应用程序目录中,从WP管理员添加一个页面段塞,并更新开发环境。

然后从命令行构建您的React应用程序。现在,您可以将该构建推送到您的实时网站。在那里,你必须为你的React应用程序选择相同的页面段塞。然后它应该显示在您选择的页面段塞下方。

最新更新