Hello tout le monde,
Je ne sais pas si ça a un rapport mais après avoir mis à jour mon navigateur, et à sa réouverture, j’ai obtenu une erreur 502 Bad Gateway.
J’ai regardé du côté de nginx si tout allait bien :
root@PinkFungi:/home/pickfungi# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
J’ai tenté de lancer directus manuellement et il m’a demandé d’installer des packages :
pickfungi@PinkFungi:~$ npx directus start
Need to install the following packages:
directus
Ok to proceed? (y) y
npm WARN deprecated @types/[email protected]: This is a stub types definition. pino provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: This module renamed to process-warning
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
10:15:46 ⚠️ Couldn't load extensions
10:15:46 ⚠️ Current folder does not contain a package.json file
10:15:46 🚨 "KEY" Environment Variable is missing.
Là, j’ai vu que mon fichier package.json avait disparu …
J’ai tenté de recréer ce fichier comme sur le cour :
{
"name": "pickfungi",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "npx directus start",
"test": "echo\"Error: no test specified\" && exit 1"
},
"keyword": [],
"author": "",
"license": "ISC",
"dependencies": {
"directus": "^9.4.3",
"mysql": "^2.18.1"
}
}
J’ai tenté de réinstaller pm2 et ensuite de réexecuter la commande :
pickfungi@PinkFungi:~$ pm2 start npm —-name «directus» —- start
[PM2] Spawning PM2 daemon with pm2_home=/home/pickfungi/.pm2
[PM2] PM2 Successfully daemonized
[PM2] Starting /home/pickfungi/.nvm/versions/node/v16.14.0/bin/npm in fork_mode (1 instance)
[PM2] Done.
[PM2][ERROR] Script not found: /home/pickfungi/—-name
Là, le script n’est pas trouvé …
J’ai remarqué que j’avais un fichier package-lock.json qui était maintenant présent dans le répertoire.
Je ne sais plus quoi faire et je ne comprends pas qu’il y ait eu ce problème sans la moindre intervention de ma part.
Help !!