Hi, having some real issues getting development mode to work with this setup. I’ve got the cms working correctly on the server through plesk. I have a server.js file which simply contains the following:
I can change the node settings in plesk to either production or development, after reloading the app it the correct shows whichever state i chose before going to the login screen. The issue is that I can’t edit collection types and get the error "The autoReload feature is required to use this plugin. Start your server with strapi develop"
How can i get this working properly so i edit collection types with this setup?
If you are running in production, the CTB (Content-type builder) is forcefully disabled in production and staging. You should not create/update/delete content-types in these environments due to how Strapi it built.
Thanks for the reply. I have node environment set to “development” and i’ve rebuilt the admin panel. is there no way to run in development mode via plesk? It shows as being in development mode but i still get the warning when opening the CTB,
We don’t have an API option to start strapi in development mode with a server.js or app.js
strapi(/* {…} */).start(); ← This is basically the same as running npm run start or yarn start and what is required to use the development mode is basically npm run develop or yarn develop but there is nostrapi(/* {…} */).develop(); option.
If Plesk allows you to run a custom command you could run it like this, but as mentioned earlier we don’t support nor recommend it.
I’m currently stuck on the same issue as @rishabhchand007 had, the 403. A fix for this on Plesk is allowing directory discovery on the server, however, this will not do much since your new error will be 404 (on upload/<some_file>). The rest of the panel works perfectly fine, I’m even able to upload a new site logo. Just when I try to access the media library, or when I try to add new media, it will throw an error. @Arklogic since you managed to set this up, do you maybe have a guide for us which you followed?
If any of you could help me, that would be really appreciated!
@rishabhchand007 the problem with the 403 error has to do with nginx proxying to Apache. Turn this off and it should work. Go to:
Your strapi domain ==> Hosting & DNS ==> Apachy & nginx Settings ==> Proxy mode (under nginx) and turn it off
I also tried @MyKrzysiu 's strategy, but still not working. I don’t get any errors. When I go to my domain it just sends back the default Plesk template. Any Idea of why is this happening?. Should I reference a document besides server.js on NodeJS or something similar?
Hello Maria. you also had the same problem? I am trying to deploy my Strapi CMS into PLESK VPS, I also am having these problems with “./public/uploads” mostly with the images, they don’t load the images, it blocks me for 10 minutes and I can’t find the solution. it has to do with 403 Error. What is the real solution? Could you tell me?
@Alexander_C This is a late reply to your question, but I’ve found that Plesk will block some Strapi requests. I have had to go into the Plesk Web Application Firewall and disable rules 211760 and 210492.
Also, for anyone now using Strapi v5 the server.js file has changed (different syntax on second line):
I put this in the server.js STRAPI V5 y it still doesn’t work, I got this error —>>
server.js:1 import strapi from ‘@strapi/strapi’; ^^^^^^ SyntaxError: Cannot use import statement outside a module at wrapSafe (node:internal/modules/cjs/loader:1378:20) at Module._compile (node:internal/modules/cjs/loader:1428:41) at Module._extensions…js (node:internal/modules/cjs/loader:1548:10) at Module.load (node:internal/modules/cjs/loader:1288:32) at Module._load (node:internal/modules/cjs/loader:1104:12) at Module.require (node:internal/modules/cjs/loader:1311:19) at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:80:25) at require (node:internal/modules/helpers:179:18) at loadApplication (/usr/share/passenger/helper-scripts/node-loader.js:243:2) at setupEnvironment (/usr/share/passenger/helper-scripts/node-loader.js:214:2) Node.js v20.18.1------------->