Система - Node.js версия: v10.19.0 - NPM версия: 6.13.4 - Версия Strapi: 3.0.0-Beta.2 - База данных: PostgreSQL 10.11 - Операционная система: MacOS Catalina
Опишите ошибку Я пытаюсь запустить локальный Strapi на моей Ma c. npm run build
работает хорошо. Тем не менее, у него есть некоторые проблемы со стартом и развитием. Когда я пытаюсь запустить его по pm2 start npm --name "CMS" -- start
, он продолжает перезагружаться. Я проверил OUT-журналы приложения, и есть несколько ошибок, например
{ error: syntax error at or near "url"
at Connection.parseE (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:602:11)
at Connection.parseMessage (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:399:19)
at Socket.<anonymous> (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:121:22)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 92,
severity: 'ERROR',
code: '42601',
detail: undefined,
hint: undefined,
position: '50',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'scan.l',
line: '1128',
routine: 'scanner_yyerror' }
[2020-04-06T21:30:50.439Z] warn The SQL database indexes haven't been generated successfully. Please enable the debug mode for more details.
{ error: syntax error at or near "name"
at Connection.parseE (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:602:11)
at Connection.parseMessage (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:399:19)
at Socket.<anonymous> (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:121:22)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 93,
severity: 'ERROR',
code: '42601',
detail: undefined,
hint: undefined,
position: '49',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'scan.l',
line: '1128',
routine: 'scanner_yyerror' }
[2020-04-06T21:30:50.439Z] warn The SQL database indexes haven't been generated successfully. Please enable the debug mode for more details.
Когда я запускаю npm run start
, я получаю следующую ошибку.
23 ],
__knexQueryUid: '4301a348-badc-484f-a418-4f0f5ab4a2a6',
sql:
'update "core_store" set "key" = ?, "environment" = ?, "tag" = ?, "value" = ?, "type" = ? where "id" = ?',
returning: undefined }
{ method: 'insert',
options: {},
timeout: false,
cancelOnTimeout: false,
bindings:
[ 'development',
'plugin_upload_provider',
'',
'object',
'{"provider":"local","name":"Local server","enabled":true,"sizeLimit":1000000}' ],
__knexQueryUid: '797edf19-aaab-43ff-a2f3-7c25519fb700',
sql:
'insert into "core_store" ("environment", "key", "tag", "type", "value") values (?, ?, ?, ?, ?) returning "id"',
returning: 'id' }
{ method: 'select',
options: {},
timeout: false,
cancelOnTimeout: false,
bindings: [ 'plugin_users-permissions_advanced', '', '', 1 ],
__knexQueryUid: '51c83527-e289-4c2b-bb0c-48fe7fd34d86',
sql:
'select "core_store".* from "core_store" where "core_store"."key" = ? and "core_store"."environment" = ? and "core_store"."tag" = ? limit ?' }
[2020-04-06T22:20:17.365Z] error error: duplicate key value violates unique constraint "core_store_pkey"
at Connection.parseE (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:602:11)
at Connection.parseMessage (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:399:19)
at Socket.<anonymous> (/usr/local/var/www/trip4share-cms/node_modules/pg/lib/connection.js:121:22)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! trip4share-cms@1.0.0 start: `strapi start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the trip4share-cms@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Lord-of-the-Mac/.npm/_logs/2020-04-06T22_20_17_400Z-debug.log
Удаленная версия на Linux работает хорошо. Что я должен проверить?