Problem z komendą: npm audit fix

Zombie
vps
Pjot3r
Pjot3r

gdy wpisuje npm audit fix wyspakuje taki bład

npm ERR! code EAUDITNOPJSON npm ERR! audit No package.json found: Cannot audit a project without a package.json

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-21T06_22_06_811Z-debug.log

DBanaszewski
DBanaszewski α-tester v3

Pjot3r:

Cannot audit a project without a package.json npm init, wpisz co musisz i gotowe.

Pjot3r
Pjot3r

@DBanaszewski teraz jak wpisuje nodejs site to wyskakuje

Error: Problem with log4js configuration: ({ appenders: [ { type: 'console' }, { type: 'file', filename: 'logs/site.log' } ] }) - must have a property "appenders" of type object. at /var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:31:13 at Array.forEach () at Object.throwExceptionIf (/var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:29:9) at /var/www/html/Bot/BOT/node_modules/log4js/lib/appenders/index.js:99:17 at /var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:46:33 at Array.forEach () at Object.configure (/var/www/html/Bot/BOT/node_modules/log4js/lib/configuration.js:46:13) at Object.configure (/var/www/html/Bot/BOT/node_modules/log4js/lib/log4js.js:66:17) at Object. (/var/www/html/Bot/BOT/site.js:10:8) at Module._compile (internal/modules/cjs/loader.js:1156:30)

DBanaszewski
DBanaszewski α-tester v3

Pjot3r:

must have a property “appenders” of type object.

Jak widać, jest to błąd związany z log4js, zerknij sobie tutaj: https://github.com/log4js-node/log4js-node/issues/500

Pjot3r
Pjot3r

@DBanaszewski teraz taki

[2020-04-22T14:42:38.721] [INFO] default - DB Connection ID: 118 [2020-04-22T14:42:38.725] [INFO] default - DB Connection ID: 119 [2020-04-22T14:42:38.728] [INFO] default - DB Connection ID: 121 [2020-04-22T14:42:38.729] [INFO] default - DB Connection ID: 120 [2020-04-22T14:42:38.730] [WARN] default - Loaded hashd8b710dfa2c8a3d990ca1dc7cc0a91754ac20aa6139fb7f6d44b58ee31ece8dc [2020-04-22T14:42:38.967] [DEBUG] default - SyntaxError: Unexpected token < in JSON at position 1 at JSON.parse () at Request._callback (/var/www/html/Bot/BOT/site.js:66:16) at Request.self.callback (/var/www/html/Bot/BOT/node_modules/request/request.js:185:22) at Request.emit (events.js:310:20) at Request. (/var/www/html/Bot/BOT/node_modules/request/request.js:1154:10) at Request.emit (events.js:310:20) at IncomingMessage. (/var/www/html/Bot/BOT/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:416:28) at IncomingMessage.emit (events.js:322:22) at endReadableNT (_stream_readable.js:1187:12)

DBanaszewski
DBanaszewski α-tester v3

Pjot3r:

default - SyntaxError: Unexpected token < in JSON at position 1

Uszkodzony JSON 😕

Pjot3r
Pjot3r

To co zrobić?

Pjot3r
Pjot3r

@DBanaszewski teraz już wszystko działa ale jak chce wejść w phpmyadmin to pisze że root@localhost nie ma dostępu i nawet na str nmg wejść

DBanaszewski
DBanaszewski α-tester v3
CREATE USER 'admin'@'%' IDENTIFIED BY 'HASLO';
GRANT ALL PRIVILEGES ON * . * TO 'admin'@'%';
FLUSH PRIVILEGES;
EXIT;
system
system

Ten temat został automatycznie zamknięty 32 dni po ostatnim wpisie. Tworzenie nowych odpowiedzi nie jest już możliwe.