Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

443
Visualizações
Deploying Strapi to Plesk - strapi not found

I want to deploy strapi to a server managed with plesk. I installed strapi in cli. Strapi itself also runs there but says that i should visit localhost:1337/admin

In Plesk a startup-file is needed. Strapi suggests a server.js with 2 lines of code in it

const strapi = require('strapi');

strapi(/* {...} */).start();

however, i exactly this. When i hit the NPM install button it also resolves everything without any problem. If i want to reach my site i get a error from Phusion Passenger

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'strapi'
Require stack:
- /var/www/vhosts/frosty-goldstine.82-165-106-228.plesk.page/strapi/server.js
- /usr/share/passenger/helper-scripts/node-loader.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:80:25)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/var/www/vhosts/frosty-goldstine.82-165-106-228.plesk.page/strapi/server.js:1:16)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/www/vhosts/frosty-goldstine.82-165-106-228.plesk.page/strapi/server.js',
    '/usr/share/passenger/helper-scripts/node-loader.js'
  ]
}

How is it possible, that strapi is unknown? And how can i resolve?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Just need to call the good node_module @strapi/strapi instead of strapi

  • Ubuntu 20.04.4 LTS
  • Plesk Obsidian
  • Strapi 4.1.9
  • npm 6.14.17
  • node 14.19.3
const strapi = require('@strapi/strapi');
strapi().start();
about 4 years ago · Juan Pablo Isaza Relatório

0

Make sure you run npm install before trying to start the application.

I don't remember how to do this from the admin interface, but you can SSH into the server and run <path-to-npm>/npm install

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda