Open djpanda opened 1 year ago
This seems like an unexpected error. Is the non-dev version working (step 8) in docs. Also, I think you might have added an unexpected character somewhere in the code. Could you run the git restore .
command or re-clone the repo if the error exists
Step 8:
$ npm run build-client
pckd@1.0.0 build-client cd client && npm run build
pckd@0.1.0 build react-scripts build
Creating an optimized production build... Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating Compiled successfully.
File sizes after gzip:
427.35 kB build/static/js/main.7039773b.js
The project was built assuming it is hosted at /manage/. You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
Find out more about deployment here:
djpanda@web:/var/www/short.webport.at/public_html$ npm start
pckd@1.0.0 start export NODE_ENV=production && cd server && npm start
api@1.0.0 start npm run dev
api@1.0.0 dev nodemon src/.
[nodemon] 2.0.20
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node src/.
/var/www/short.webport.at/public_html/server/src/utils/isp.js:11
type: data?.company?.type,
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.
THe only files i altered are the ones in the docs. "client and server folder and fill in the values in the .env file" "server/prisma/schema.prisma file and replace postgresql" was already mysql. Didnt hat to change anything there
Server/.env
PORT=4000
DATABASE_URL="mysql://pschkodrt:z10zq3CLD%8g07RFvaYFU8cYX6s9z%96@localhost:3306/shortpckd?schema=public&pool_timeout=0"
IPREGISTRY_API_KEY="bafluzh969ph3ky9"
JWT_SECRET="zH9aKb!d2VO!"
TRUST_PROXY="true"
Alphanumerics and Numbers Changed, position switched and the Symbols too, but thats the .env nearest without giving out my secrets ^^
client/.env unchanged
$ sudo git restore . $ npm run build-client
pckd@1.0.0 build-client cd client && npm run build
pckd@0.1.0 build react-scripts build
Creating an optimized production build... Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating Compiled successfully.
File sizes after gzip:
427.35 kB build/static/js/main.7039773b.js
The project was built assuming it is hosted at /manage/. You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
Find out more about deployment here:
$ npm start
pckd@1.0.0 start export NODE_ENV=production && cd server && npm start
api@1.0.0 start npm run dev
api@1.0.0 dev nodemon src/.
[nodemon] 2.0.20
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node src/.
/var/www/short.webport.at/public_html/server/src/utils/isp.js:11
type: data?.company?.type,
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.
npm start
[nodemon] 2.0.20 [nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] startingnode src/.
/var/www/short.webport.at/public_html/server/src/utils/isp.js:11 type: data?.company?.type, ^SyntaxError: Unexpected token '.' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/var/www/short.webport.at/public_html/server/src/utils/hitInsert.js:1:13)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[nodemon] app crashed - waiting for file changes before starting...