Problems with fresh Vite-app
-
Hi! Thanks for your work regarding Reactpress.
We have had no problems in creating a CRA app and pushing it to production, however, when trying to do the same with a clean Vite app (as per your instructions:
npx create-vite [your-appname] --template react), pushing it to production (build folder name is “dist”) gives us the error below. We saw that there is a thread about another person wanting to convert from CRA to Vite, and you mentioned that the “dist” folder should be removed? If we remove the “dist” folder, we can access the chosen page but there is no app rendered.Many thanks in advance!
Uncaught TypeError: Return value of ReactPress\Admin\Utils::app_path() must be of the type string, null returned in /home/user/domains/xxxxxx.xx/public_html/wp-content/plugins/reactpress/admin/Utils.php:54 Stack trace: #0 /home/user/domains/xxxxxx.xx/public_html/wp-content/plugins/reactpress/public/User.php(182): ReactPress\Admin\Utils::app_path('xxxxx', true) #1 [internal function]: ReactPress\User\User->ReactPress\User\{closure}('index-BPgokE0a....') #2 /home/user/domains/xxxxxx.xx/public_html/wp-content/plugins/reactpress/public/User.php(185): array_map(Object(Closure), Array) #3 /home/user/domains/xxxxxx.xx/public_html/wp-content/plugins/reactpress/public/User.php(93): ReactPress\User\User->repr_load_react_app() #4 /home/user/domains/xxxxxx.xx/public_html/wp-includes/class-wp-hook.php(324): ReactPress\User\User->enqueue_scripts('') #5 /home/user/domains/xxxxxx.xx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6
The topic ‘Problems with fresh Vite-app’ is closed to new replies.